
February 27th, 2001, 12:33 PM
|
|
Junior Member
|
|
Join Date: Feb 2001
Posts: 3
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
Having a problem with the IBM SAX parser (which is Xerces).
We have the data comming from a client that looks something like this:
<tag>
A string of about 300 characters containing an embedded null
</tag>
Now when our Java servlet parses this we have a character method that does this:
public void characters(char[] ch, int start, int length)
{
String s = new String(ch, start, length);
.
.
.
And we get an SAX parser error on the column containing the null (Unicode 0x0).
What is the best way to handle this? I don't think ignorable Whitespace solves the problem since that seems to handle elements that are entirely whitespace. Any help is appreciated.
|