You can avoid it by correctly encoding your XML, unless it's in a CDATA section.  Otherwise valid XML requires that if you want an ampersand in your data, it should be encoded as &

David

Leena Kulkarni wrote:
Hello,
 
We have & character in the xml in data that we send to the parser.
 
It is giving exception -
org.xml.sax.SAXParseException: The entity name must immediately follow the '&' in the entity reference.
 
How can we avoid it? We tried setting the encoding of the InputScource object we created from xmlString. But it is not working.
 
Please help.
 
Regards,
Leena


Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail Beta.

Reply via email to