Hello,

I am trying to convert a String with XML content in it into the org.w3c.dom.Document object to do some modifications and then to convert it back to the String. However, even if I do not do any modifications to the object, I am still getting back a different String than what I have provided as an input. The problem is with the numerical character references. For example, if my input String is:

<?xml version="1.0" encoding="UTF-8"?>
<xml>
  &#169;
&#38; </xml>

Once I convert this to an org.w3c.dom.Document object and then back to String, I am getting this as a result:

<?xml version="1.0" encoding="UTF-8"?>
<xml>
  ©
&amp; </xml>

Please let me know (an example code would be very appreciated) if it is possible at all to preserve the numerical character references so they aren't converted to the actual characters.

Thanks,
Artur

---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.org
For additional commands, e-mail: j-users-h...@xerces.apache.org

Reply via email to