I am trying to get the XML value of a node.
To get the Nodelist i am doing this
NodeList list = (NodeList) doc.getElementsByTagName("response")
To get particular Node I am doing:
list.item(index);
From the node i can get the text content of the node but I don't know how to get the XML String value of a node.
For example:
<add job="351">
<test>
<tag>foobar</tag>
<tag>foobar2</tag>
</test>
</add>
I can pick the node with tag "test". Now from the Node i want output like this:
<test>
<tag>foobar</tag>
<tag>foobar2</tag>
</test>
Any help is appreciated.