Remove parent xml tag based on child value
Posted
by cru3l
on Stack Overflow
See other posts from Stack Overflow
or by cru3l
Published on 2010-06-14T14:53:49Z
Indexed on
2010/06/14
15:12 UTC
Read the original article
Hit count: 223
For example, we have xml file with this format:
<A>
<B>
<C></C>
<D></D>
<D></D>
</B>
</A>
i need that: if all "D"-tags elements are empty, then we need to delete whole "A"-tag element
and, of course, we need to do this with all "A"-tags in xml.
© Stack Overflow or respective owner