Hi,

I just found the source of my current problem: the parser behaves
differently for very short XML "files" than for longer ones:  if the
number of translated bytes is less than 100, it does an additional
XMLReader::RefreshRawBuffer in XMLReader::xcodeMoreChars, which
ultimately calls BinInputStream::readBytes.

My solution to this is as follows:
 1) I have an EOF flag in BinSockInputStream (initially false)
 2) Once I saw the seperation char, I set the EOF flag to true
 3) As long as the EOF flag is true, BinSockInputStream::readBytes
    always retuns 0
 4) As the InputSource always recreates the BinInputStream, the flag
    is reset for the next XML "file"
 5) Additional data from the next XML file (because the last TCP
    packet we received contained the rest of the current XML file and
    the beginning of the next one) is buffered in my SocketInputSource
    and passed as initial data to the next InputSource::makestream
    call.


So ultimately I just removed the one line which set the EOF flag to
false again on the second invocation of readBytes after seeing the
seperation char... (which works becuase for each XML file, a new
BinInputStream is created).


Thanks for your help!

--nk



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to