users@jaxb.java.net

SAX Parse Exceptions + setting encoding type

From: Anthony Maguire <ajmsonic_at_yahoo.co.uk>
Date: Thu, 27 Mar 2003 09:21:24 -0700

Hi

I have 2 applications both using jaxb for the transmitting of xml data. Both the applications are using the java classes generated from the xsd, just one is doing marshalling and the other one is unmarshalling the data. Occasionally i get the following error on the unmarshalling application:

org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x0) was found in the element content of the document

if anybody could shed some light on this, it would be much appreciated.

relating to this i was wondering if you can specify the encoding for the xml document (have searched the archives but have not found anything), ie to have

<?xml version="1.0" encoding="ISO-8859-1"?>

instead of

<?xml version="1.0" encoding="UTF-8"?>

thanks in advance,
anthony