summaryrefslogtreecommitdiff
path: root/examples/structure1
blob: 13884e7a92860f83f1bad110771bfe81542e8ce5 (plain)
1
2
3
4
5
#!/bin/sh
# Print structure of XML element using xml sel (advanced XPath expressions and xml sel command usage)
./xmlstarlet sel -T -t -m '//*' \
-m 'ancestor-or-self::*' -v 'name()' -i 'not(position()=last())' -o . -b -b -n \
xml/structure.xml