I have a xml document like this rootXMLDoc=<root> <param></param></root> . I need to insert paramxmlDoc= <parameter par='1'>abc</parameter>. how to insert paramxmlDoc to rootXMLDoc in java.? and i need output like this
<root>
<parameter ...
What's the simplest way to get the String representation of a XML Document (org.w3c.dom.Document)? That is all nodes will be on a single line.
As an example, from