XSLT XML to XML Remove node if specific child not does not exist

Ara

New Member
I'm new to XSL, and not able to find information on this question. This is only for XSLT 1.0, and will eventually be run from XSLTproc.Here is an example XML\[code\]<root><node> <data /> <child> <grandchild /> </child> <step-child action="removenode" /></node><node> <data /> <step-child action="removenode" /></node></root>\[/code\]Basically, I want to keep everything except.remove any \[code\]<node>\[/code\] with no \[code\]<child>\[/code\]remove all \[code\]<step-child>\[/code\]I can only figure out how to remove unwanted nodes, but even that is questionable. I really appreciate any help with this.
 
Back
Top