I am parsing a XML file in Java using the W3C DOM. I am stuck at a specific problem, I can’t figure out how to get the whole inner XML of a node.
The node looks like that:
<td><b>this</b> is a <b>test</b></td>
What function do I have to use to get that:
'<b>this</b> is a <b>test</b>'
You have to use the transform/xslt API using your <b> node as the node to be transformed and put the result into a new StreamResult(new StringWriter()); . See how-to-pretty-print-xml-from-java