> My problem would be the same if I would try to
>parse from memory but have two XML "files" in this memory separated by
>Ctrl-L (or any other encoding which allows to seperate "files" in the
>stream.
XML syntax, and XML parsers, were never designed to handle that case; in
fact, XML parsers are expected to ignore most of what the stream might
throw at them after the top-level element's end-tag has been processed.
If you need it, you need to impose your own higher-level protocol on the
datastream. The usual approach is to set up a filter on that stream --
something that implements the Input Stream API on one side, and on the
other side reads from an InputStream. That filter would respond to
Control-L (or whatever your end-of-document mark is) by simulating
end-of-file until you explicitly told it to continue reading its input.
This does impose overhead -- an extra level of call-and-return and an extra
test per character to see of end-of-document has been reached -- but it's
generally acceptable and there really isn't another portable solution.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]