Hi,
I have to parse a xml document, that actually is received in many
chunks, and unfortunately I have to parse it chunk by chunk and not at
the end, when I've received all the pieces.
I was thinking at a SAX parser, since I have to push the parser when i
receive the data.
I was also thinking at an OutputStream where to write the chunks when I
receive them, and pipe the OutputStream to an InputStream to be passed
to the parser.
But I think there is no way to let the parser read from the InputStream
in the same thread.
So I have to create a thread for every receiving document, but since the
program may actually receive many different documents at the same time
and that chunks may be received with long delays I have to create many
threads that will be mainly idle while waiting for the chunks.
Is there a way to bypass the piped input and output streams and directly
call the parser on a single chunk when it is received?
Does exist a non-blocking parser that does not wait if the input stream
is not ready?
In other words, is there a way to call a parse in the same thread only
for a xml document piece, and call it many times until the document is
completely received?
thank you very much,
marco
---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.org
For additional commands, e-mail: j-users-h...@xerces.apache.org