def METHOD_NAME(input):
    if java:
        beginMsg = re.compile("^<REQUEST domainType=\"MARKET_PRICE\" .*")
        endMsg = re.compile("^</REQUEST>$")
        updateMsg = re.compile("^<UPDATE domainType=\"MARKET_PRICE\" .*")
    else:
        beginMsg = re.compile("^<requestMsg domainType=\"RSSL_DMT_MARKET_PRICE\" .*")
        endMsg = re.compile("^</requestMsg>$")
        updateMsg = re.compile("^<updateMsg domainType=\"RSSL_DMT_MARKET_PRICE\" .*")
    eventMsg = re.compile("^event: .*")
    streamPos = input.tell()
    line = input.readline()
    while (line):
        if updateMsg.match(line):
            return None
        if eventMsg.match(line):
            input.seek(streamPos)
            return None
        if beginMsg.match(line):
            msg = line
            line = input.readline()            
            while(line):
                msg += line
                if endMsg.match(line):
                    return msg
                line = input.readline()
        streamPos = input.tell()
        line = input.readline()
    return None