I'm working with JDOM at the moment. I can't think of a solution which what should essentially be an easy problem.
I have a valid XHTML string:
<b>M&A</b> €
How do I insert this into the XML DOM as follows?
<parentNode>
<b>M&A</b>
€
</parentNode>
(this XML then goes off to an XSL transformer, which then renders XHTML for the browser)
I've come up with the following 'pseudo' solutions, but I'm not sure if they're possible:
Unescape entities which aren't XML entities, then insert.
Reinscape only XML entites, then HTML unescape the entire string, then insert.
Taras