File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes XML and Related Technologies and the fly likes Reference to entity must end with ; Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Reference to entity must end with ;" Watch "Reference to entity must end with ;" New topic

Reference to entity must end with ;

Ravikumar Jambunathan
Ranch Hand

Joined: Aug 25, 2003
Posts: 66
Hi All,

My application uses SAX parser to strip and parse the incoming xml file. My problem is whenever the payload contains L@ampT; symbol, it is throwing 'SAX Exception saying that Reference to the entity must end with ;'.

But, i could open the xml file using xml tool such as xml spy and xml notepad. And as far i know, @amp; is valid representation in xml. I really don't understand why i am getting this exception?

For testing purpose i put one more ';' at the end of '&' like 'L&;T'. The file was processed successfully and in the output i saw 'L&;T', which was supposed to be L&T.

I will post the problamatic file as well as the exact exception phrase in my next post. In the meantime, if anybody encountered this problem before, kindly let me know the root cause of this problem and the way to resolve it.

Your earlier advice is greatly appreciated.

Thanks in advance for your time.

Thanks and regards,
I agree. Here's the link:
subject: Reference to entity must end with ;
It's not a secret anymore!