welcome/
java-mcmc/
software/
papers/
links/
email me

XML-RM

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
EXIT STATUS
EXAMPLE
AUTHORS
SEE ALSO

NAME

xml-rm − remove nodes from XML files.

SYNOPSIS

xml-rm

[OPTION]... [ [FILE]... :XPATH... ]...

DESCRIPTION

xml-rm 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 written atomically.

If the --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.

OPTIONS

--write-files

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.

EXIT STATUS

xml-rm returns 0 on success, or 1 otherwise.

EXAMPLE

Display a file without a certain attribute:

xml-rm employees.xml ://*@gender stdout

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)