[jdom-interest] Parsing XML with end of stream marker
jonbaer at digitalanywhere.com
Mon Jun 25 05:20:56 PDT 2001
Yeah ur gonna have to trim that bad boy off, Id say extend the Reader and create your
own and either test for </soap-env:envelope> or substring it till indexOf("<EOS>");
The builder lets you take a String now so you might wanna filter the stream first
before you pass it to the builder.
Tim Sawyer wrote:
> 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'?>
> <m:loginapplicationresponse xmlns:m="http://www.pancredit.com/methods"
> 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?
> 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
> To control your jdom-interest membership:
More information about the jdom-interest