K
KN
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("http://someurl");
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
proe-processing
the input byte array after each exception - am parsing using the code
below ...
org.apache.commons.httpclient.HttpMethod method = new
GetMethod("http://someurl");
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