James Richardson wrote: > org.xml.sax.SAXParseException: The root element is required in a well-formed > document.
This is normal and according to the spec. Unfortunately, there is no defined end to an XML document because any number of PIs and comments may appear after the close of the root element. And because of buffering in the parser, even if you reset the parser, there's no way to re-use the buffer -- so the parser would consume part of the next document which is not what you want. If you can control the streams at both ends, then you can use the WrappedOutputStream/WrappedInputStream written as a Xerces2 sample. The sample solves a common socket streaming problem but it could also be applied to your particular problem. Check out the code with the following command (the code will be extracted to the "io" dir): cvs checkout -d io -r xerces_j_2 xml-xerces/java/samples/socket Or use the WebCVS interface. The JavaDoc in the sample should be enough to figure out how to use it. -- Andy Clark * IBM, TRL - Japan * [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
