File: tree1

package info (click to toggle)
xmlstarlet 1.6.1-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,412 kB
  • ctags: 656
  • sloc: sh: 4,735; ansic: 4,183; xml: 1,936; makefile: 70; awk: 43
file content (4 lines) | stat: -rwxr-xr-x 204 bytes parent folder | download | duplicates (6)
1
2
3
4
#!/bin/sh
# Print subtree of elements having given element as a descendant (advanced XPath)
./xmlstarlet ed -d '//node()[not(descendant-or-self::isbn or parent::isbn)] | //*[parent::isbn]' xml/books.xml