Win a copy of Penetration Testing Basics this week in the Security forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Reference to entity must end with ;

Ravikumar Jambunathan
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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,
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic