[jdom-interest] escape characters within a element text
Niroshan
niroshan at markus.no
Tue Sep 30 06:31:21 PDT 2003
hi
if i have a string which is a xml, but contains invalid characters within the elements text, how can i create a xml document out of it.
If the string is as below
<person>
<name>jack </name>
<description> height of jack is < 6 feet </description>
</person>
here the description text contains the character '<', so if we try to create a dom document using the SAXBuilder it gives an exception. Is there a way in JDOM to say replace those characters with the required escape characters?
before creating the dom document?
regards
niroshan
More information about the jdom-interest
mailing list