Link to home
Create AccountLog in
Avatar of hemanexp
hemanexp

asked on

Promblem while parsing the XML

Hi,


I got the follwoing error while parsing the XML file.

[Fatal Error] :2:2325: The entity name must immediately follow the '&' in the entity reference.

 Exception: org.xml.sax.SAXParseException: The entity name must immediately follow the '&' in the entity reference.

My XML has a tag called <company_name> which contains & symbol like "ABC & Co".
How can i resolve it.

Thanx in advance.
Avatar of Gertone (Geert Bormans)
Gertone (Geert Bormans)
Flag of Belgium image

you have to replace & by &amp;
ASKER CERTIFIED SOLUTION
Avatar of Gertone (Geert Bormans)
Gertone (Geert Bormans)
Flag of Belgium image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of Leo Eikelman
Leo Eikelman

Or enclose the expression with CDATA:

<param name="expression"><![CDATA[ myURL.indexOf('&') > 0 ]]</param>

This might be a better solution as it will catch ANY characters that will cause this problem

such as &, >, <, etc..


Cheers,

Leo