Using Java SAX XML writer to construct an XML file with elements containing HTML tags
Posted on 2008-09-29
I'm using Java XML SAX writer to write an XML file from a map object containing some data. The can get it create the file just fine. However some data elements contain HTML syntax which I need to preserve. SAX writer for some reason is re-processing the HTML tags when reading in the data e.g.
<p>One, two! One, two! And through and through<br />
<p>One, two! One, two! And through and through<br />&nbsp;
Basically I don't want the writer to modify HTML tags at all, I just want it to include them in the resulting XML file as is. Is there anyway to stop this from happening?