This command may be used to interactively edit parts of a XML document directly in your favorite editor.
A given expression is evaluated to a node-list and the
first the first resulting node is opened
in an external editor as a XML fragment.
When the editor exits, the (possibly modified) fragment
is parsed and returned to the original document. Unless
:q) flag is
used, the XML fragment is preceded with a XML comment specifying
canonical XPath of the node being edited.
The command returns a node-list consisting of nodes that resulted from parsing the individual edits.
option may be used to specify external editor command.
If not specified, environment variables
are tried first, then
is used as a fallback.
flag is present, all nodes from the node-list
are opened in the editor, one at a time.
is specified, the parser tries to recover from possible
syntax errors when parsing the resulting XML.
option may be used to force the parser to
include ignorable white space.
If the result saved
by the editor is empty, the interactive
XSH2 shell asks user to confirm this was correct.
This confirmation can be suppressed using
:0 (zero) options.
parameter can be used to specify character encoding to
use when communicating with the external editor.
Example 1. Edit all chapter elements (one by one) with emacs
edit --editor 'emacs -nw' --encoding iso-8859-1 --all //chapter