When there are special characters like & in the xhtml the DOM / SAX parser throws parse exception. The xhtml document is got as an input for my component. I want to ignore such special characters when i parse. How can i achieve it using DOM/SAX JAVA parser.
+3
A:
&
should be encoded as &
. If it's not then your XHTML is encoded wrongly. Whatever is writing it should escape these (and other) characters properly according to the XML specification.
Brian Agnew
2010-05-10 20:26:43
+3
A:
How do the "special" characters get into the XHTML? XHTML is meant to be XML. It should be created by tools that understand XML. If you're using string manipulation to create your XHTML, then you're setting yourself up for errors like this.
John Saunders
2010-05-10 20:29:43