Debian Codegraph @

examples/tree1

raw
1 #!/bin/sh
2 # Print subtree of elements having given element as a descendant (advanced XPath)
3 ./xmlstarlet ed -d '//node()[not(descendant-or-self::isbn or parent::isbn)] | //*[parent::isbn]' xml/books.xml
4