XML : how to remove all nodes which have no attributes nor child elements
- by mishal153
I have a xml document like this :
<Node1 attrib1="abc">
<node1_1>
<node1_1_1 attrib2 = "xyz" />
</ node1_1>
</Node1>
<Node2 />
Here <node2 /> is the node i want to remove since it has not children/elements nor any attributes.