J
jsmith
Hi all,
I need help on an elegant way of removing nodes from XML that do not
have children with text that is kept in array.
Here is the example:
I have array of integers = {123, 456}
and an XML like this:
<W>
<U></U>
<P></P>
<S></S>
<LIST>
<INS>
<I>
<L></L>
<F></F>
<ID>123</ID>
</I>
</INS>
<INS>
<I>
<L></L>
<F></F>
<ID>456</ID>
</I>
</INS>
<INS>
<I>
<L></L>
<F></F>
<ID>999</ID>
</I>
</INS>
</LIST>
</W>
I need to remove all <INS> nodes whose I/ID child has text that IS NOT
in array. In here it is the last <INS> node because ID text is 999
which is not in array.
Thanks
I need help on an elegant way of removing nodes from XML that do not
have children with text that is kept in array.
Here is the example:
I have array of integers = {123, 456}
and an XML like this:
<W>
<U></U>
<P></P>
<S></S>
<LIST>
<INS>
<I>
<L></L>
<F></F>
<ID>123</ID>
</I>
</INS>
<INS>
<I>
<L></L>
<F></F>
<ID>456</ID>
</I>
</INS>
<INS>
<I>
<L></L>
<F></F>
<ID>999</ID>
</I>
</INS>
</LIST>
</W>
I need to remove all <INS> nodes whose I/ID child has text that IS NOT
in array. In here it is the last <INS> node because ID text is 999
which is not in array.
Thanks