remove nodes from XML files.
[FILE]... :XPATH... ]...
removes the selected XML nodes in each FILE on the command
line, or on the standard input if no FILE is given. The
selected nodes for each FILE must match the associated
XPATH(s) according to the common unified command line
convention described in xml-coreutils(7).
To update a
FILE that is not the standard input, the --write-files
switch must be given. In that case, each input file is
--write-files switch is not given, then xml-rm only
removes nodes from a document on the standard input, writing
the result to the standard output. This is the default.
If an XPATH
ends with a slash, then only the text value of the matching
node(s) is removed (ie keeping the surrounding tags intact).
If the XPATH does not end with a slash, then the surrounding
tag is also removed. It is best to experiment.
This option must be given if
the input FILE(s) are to be updated on the filesystem.
Without it, only the standard input is filtered.
0 on success, or 1 otherwise.
Display a file
without a certain attribute:
xml-rm employees.xml ://*@gender stdout
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: