| 1 |
XMLStarlet Toolkit: Edit XML document(s) |
| 2 |
Usage: PROG ed <global-options> {<action>} [ <xml-file-or-uri> ... ] |
| 3 |
where |
| 4 |
<global-options> - global options for editing |
| 5 |
<xml-file-or-uri> - input XML document file name/uri (stdin otherwise) |
| 6 |
|
| 7 |
<global-options> are: |
| 8 |
-P, or -S - preserve whitespace nodes. |
| 9 |
(or --pf, --ps) Note that space between attributes is not preserved |
| 10 |
-O (or --omit-decl) - omit XML declaration (<?xml ...?>) |
| 11 |
-L (or --inplace) - edit file inplace |
| 12 |
-N <name>=<value> - predefine namespaces (name without 'xmlns:') |
| 13 |
ex: xsql=urn:oracle-xsql |
| 14 |
Multiple -N options are allowed. |
| 15 |
-N options must be last global options. |
| 16 |
--net - allow network access |
| 17 |
--help or -h - display help |
| 18 |
|
| 19 |
where <action> |
| 20 |
-d or --delete <xpath> |
| 21 |
--var <name> <xpath> |
| 22 |
-i or --insert <xpath> -t (--type) elem|text|attr -n <name> [-v (--value) <value>] |
| 23 |
-a or --append <xpath> -t (--type) elem|text|attr -n <name> [-v (--value) <value>] |
| 24 |
-s or --subnode <xpath> -t (--type) elem|text|attr -n <name> [-v (--value) <value>] |
| 25 |
-m or --move <xpath1> <xpath2> |
| 26 |
-r or --rename <xpath1> -v <new-name> |
| 27 |
-u or --update <xpath> -v (--value) <value> |
| 28 |
-x (--expr) <xpath> |
| 29 |
|