Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
XML
SaxParseException mapping from column/line number
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="KN, post: 3150411"] Am have a problem with a SAX parser - but am attempting to recover by proe-processing the input byte array after each exception - am parsing using the code below ... org.apache.commons.httpclient.HttpMethod method = new GetMethod("[URL]http://someurl[/URL]"); org.apache.commons.httpclient.HttpClient client = new HttpClient(); int status = client.executeMethod(method); final byte[] responseBody = method.getResponseBody(); com.sun.org.apache.xerces.internal.parsers.DOMParser domParser = new DOMParser() domParser.parse(new InputSource(new ByteArrayInputStream(responseBody))); - which gives me a SaxParseExceptions with the message "Invalid byte 2 of 3-byte UTF-8 sequence" and also gives me the row & column the error occurred. I am totally confused by this as there seems to be no way of mapping this to the original input byte[]. The only way of so is to write the array to disc and access the file. Does anyone have ay other ideas ? Regards [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
XML
SaxParseException mapping from column/line number
Top