mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-03-28 21:16:20 +01:00
xml: more requested changes
This commit is contained in:
parent
a9538950db
commit
caa77bfe5a
2 changed files with 2 additions and 2 deletions
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
`xml edit --rename "{{//*/@id}}" -v "{{ID}}" {{path/to/input.xml|URI}}`
|
`xml edit --rename "{{//*/@id}}" -v "{{ID}}" {{path/to/input.xml|URI}}`
|
||||||
|
|
||||||
- Rename the XML elements of "table" named "rec" to "record":
|
- Rename sub-elements of the element "table" that are named "rec" to "record":
|
||||||
|
|
||||||
`xml edit --rename "{{/xml/table/rec}}" -v "{{record}}" {{path/to/input.xml|URI}}`
|
`xml edit --rename "{{/xml/table/rec}}" -v "{{record}}" {{path/to/input.xml|URI}}`
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
> Tip: use `xml elements` to display the XPATHs of an XML document.
|
> Tip: use `xml elements` to display the XPATHs of an XML document.
|
||||||
> More information: <http://xmlstar.sourceforge.net/docs.php>.
|
> More information: <http://xmlstar.sourceforge.net/docs.php>.
|
||||||
|
|
||||||
- Select all elements matching "XPATH1" and print the value of the element "XPATH2":
|
- Select all elements matching "XPATH1" and print the value of their sub-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}}`
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue