RE: Error when reading xml

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

RE: Error when reading xml

Jörg Schaible
Hello Sridhar,

Sridhar Adapalli wrote on Friday, November 25, 2005 5:54 PM:

> I am trying a very simple example.  I am trying to read the
> following xml which was actually created by
> XmlStream.toXML().  I am getting the following exception when
> I try to read the xml using XmlStream.fromXML(): " : Illegal
> XML character:  �."
> Any help will be greatly appreciated.

It seems that one of the Strings you are serializing contains a \0 character. This is a bug in XStream, since this character is not valid according the XML spec and XStream should have encoded it. Nevertheless XML parsers differ in their tolerance and the Xpp is supposed to handle this anyway. Otherwise you have to use a current snapshot (or build from source). See also XSTR-209.

- Jörg