X
xeroxero
I have an XML document that I would like to remove/filter whole nodes
(and their child nodes) if an attribute is not contained/matched. I
would like to output a new XML document, not modifying the original.
Can anyone recommend XSLT for this or a programmatic way if it's
faster?
<item look="a;b">
<item look="a;b">
<subitem/>
<subitem/>
<item look="a">
<subitem/>
</subitem/>
</item>
</item>
<item>
I would like to apply an expression to the above document, so any
<item> element that does not have a "b" in the look attribute is
removed. I would like the result XML document to be:
<item look="a;b">
<item look="a;b">
<subitem/>
<subitem/>
</item>
<item>
Thanks.
(and their child nodes) if an attribute is not contained/matched. I
would like to output a new XML document, not modifying the original.
Can anyone recommend XSLT for this or a programmatic way if it's
faster?
<item look="a;b">
<item look="a;b">
<subitem/>
<subitem/>
<item look="a">
<subitem/>
</subitem/>
</item>
</item>
<item>
I would like to apply an expression to the above document, so any
<item> element that does not have a "b" in the look attribute is
removed. I would like the result XML document to be:
<item look="a;b">
<item look="a;b">
<subitem/>
<subitem/>
</item>
<item>
Thanks.