xml: marchersimon requested changes

This commit is contained in:
Daniel Birket
2021-08-23 21:20:17 -04:00
committed by Starbeamrainbowlabs
parent 8815c90985
commit aa67236fc3
6 changed files with 20 additions and 20 deletions

View File

@@ -6,17 +6,17 @@
- Select all elements matching "XPATH1" and print the value of the element "XPATH2":
`xml select --template --match {{"XPATH1"}} --value-of {{"XPATH2"}} {{path/to/input.xml|URI}}`
`xml select --template --match "{{XPATH1}}" --value-of "{{XPATH2}}" {{path/to/input.xml|URI}}`
- Match "XPATH1" and print the value of "XPATH2" as text with new-lines:
`xml select --text --template --match {{"XPATH1"}} --value-of {{"XPATH2"}} --nl {{path/to/input.xml|URI}}`
`xml select --text --template --match "{{XPATH1}}" --value-of "{{XPATH2}}" --nl {{path/to/input.xml|URI}}`
- Count the elements of "XPATH1":
`xml select --template --value-of "count({{XPATH1}})" {{path/to/input.xml|URI}}`
- Count all nodes in XML document(s):
- Count all nodes in one or more XML documents:
`xml select --text --template --inp-name --output " " --value-of "count(node())" --nl {{path/to/input1.xml|URI}} {{path/to/input2.xml|URI}}`