XML : how to remove all nodes which have no attributes nor child elements
Posted
by mishal153
on Stack Overflow
See other posts from Stack Overflow
or by mishal153
Published on 2010-04-01T07:26:01Z
Indexed on
2010/04/01
7:53 UTC
Read the original article
Hit count: 221
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.
© Stack Overflow or respective owner