[jdom-interest] Parsing XML with end of stream marker

Tim Sawyer Tim.Sawyer at pancredit.com
Mon Jun 25 03:15:26 PDT 2001


Hi,

For various really annoying reasons, I have some XML that I am getting with
an <EOS> tagged onto the end of it.  So my message that I am trying to parse
contains something like:

<?xml version='1.0' encoding='ISO-8859-1'?>
<soap-env:envelope
xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope">
<soap-env:body>
<m:loginapplicationresponse xmlns:m="http://www.pancredit.com/methods"
xmlns="http://www.pancredit.com/schemas">
<securitytoken>69706GD5S3Q34</securitytoken>
<username>tim</username>
</m:loginapplicationresponse>
</soap-env:body>
</soap-env:envelope><EOS>

If I parse this using:

SAXBuilder lBuilder = new SAXBuilder();
Document lResultsDocument = lBuilder.build(this.resultsStream);

then I get the error 

org.jdom.JDOMException: Error on line 10: The markup in the document
following the root element must be well-formed.
        at org.jdom.input.SAXBuilder.build(SAXBuilder.java, Compiled Code)

Does anyone know a reasonably elegant way to deal with this?

Cheers,

Tim.




This e-mail and its attachments are for the use of the addressee only.
It may contain information that is legally privileged, confidential and 
exempt from  disclosure.  It is not a contract, and prices, data 
and other information are not warranted as to completeness or accuracy.  
Any comments or statements  made herein do not necessarily 
reflect those of PanCredit Systems Limited. If you are not the intended 
recipient you must not copy, distribute or disseminate this e-mail 
or attachments to anyone other than the addressee.  
If you receive this communication in error please advise us by telephone 
at once. 
PanCredit Systems Limited 
Tel:	+44 113 250 0260 
Fax:	+44 113 250 0621 




More information about the jdom-interest mailing list