I have a lot of XML files which have something of the form:
<Element fruit="apple" animal="cat" />
Which I want to be removed from the file.
Using an XSLT stylesheet and the Linux command-line utility xsltproc, how could I do this?
By this point in the script I already have the list of files containing the element I wish to remove, so the single file can be used as a parameter.
EDIT: the question was originally lacking in intention.
What I am trying to achieve is to remove the entire element "Element" where (fruit=="apple" && animal=="cat"). In the same document there are many elements named "Element", I wish for these to remain. So
<Element fruit="orange" animal="dog" />
<Element fruit="apple" animal="cat" />
<Element fruit="pear" animal="wild three eyed mongoose of kentucky" />
Would become:
<Element fruit="orange" animal="dog" />
<Element fruit="pear" animal="wild three eyed mongoose of kentucky" />