XML-MV
XML-MV
NAME
SYNOPSIS
DESCRIPTION
OPTIONS
EXIT STATUS
EXAMPLE
AUTHORS
SEE ALSO
NAME
xml-mv −
move nodes from XML files to an XML file or the standard
output.
SYNOPSIS
|
xml-mv |
|
[OPTION]... [
[FILE]... [:XPATH]... ]... TARGET
[:XPATH]... |
DESCRIPTION
xml-mv
moves one or more selected nodes from the supplied FILE(s)
into the TARGET file. This is conceptually similar to a
combination of xml-cp(1) and xml-rm(1). The
nodes are chosen according to the common unified command
line convention described in xml-coreutils(7).
The TARGET file
is not updated by default, only printed to the standard
output with the selected nodes inserted at the first
matching XPATH associated with TARGET. To actually write the
TARGET file, use the --write-files switch. To insert at all
matching XPATH(s) of the TARGET, use the --multi switch.
The precise
form of the data being copied and/or removed depends on the
supplied XPATH(s). In particular, the presence or absence of
a trailing slash can affect the outcome. It is best to
experiment.
OPTIONS
--write-files
update the TARGET on the
filesystem, rather than printing the result to the standard
output.
--prepend
the copied nodes are inserted
just before the data of the first matching XPATH in
TARGET.
--replace
the copied nodes replaces the
data of the first matching XPATH in TARGET.
--append
the copied nodes are inserted
just after the data of the first matching XPATH in
TARGET.
--multi
the copied nodes are inserted
near every node that matches some XPATH associated with
TARGET.
EXIT STATUS
xml-mv returns
0 on success, or 1 otherwise.
EXAMPLE
Move a node
into a different file:
xml-mv --write-files --append notes.xml :/book/note[2] important.xml :/book/
AUTHORS
Laird
A. Breyer is the original author of this software. The
source code (GPLv3 or later) for the latest version is
available at the following locations:
http://www.lbreyer.com/gpl.html
http://xml-coreutils.sourceforge.net
SEE ALSO
xml-coreutils(7)
|