XML-PRINTF
NAME
SYNOPSIS
DESCRIPTION
OPTIONS
FORMAT
EXIT STATUS
EXAMPLE
AUTHORS
SEE ALSO
NAME
xml-printf
− format and print data in an XML file to the standard
output.
SYNOPSIS
|
xml-printf |
|
[OPTION]... FORMAT
[ [FILE]... [:XPATH]... ]... |
DESCRIPTION
xml-printf
prints the string values of selected nodes according to the
FORMAT. The nodes are selected by the supplied XPATH(s) for
each associated FILE, using the common unified command line
convention described in xml-coreutils(7).
The FORMAT
string follows the usual rules of
printf(1).Inparticular,iftherearemoreargumentson
the command line than in the FORMAT, then FORMAT is
reused.
OPTIONS
FORMAT
The format
string consists of ordinary text interspersed with % escape
sequences. Among the recognized sequences are %s, %d, %f,
which convert the corresponding node value into a string, an
integer, or a floating point value. Each % escape sequence
can also contain various formatting flags which control the
minimum width and justification.
EXIT STATUS
xml-printf
returns 0 on success, or 1 otherwise.
EXAMPLE
Print two
different tag values on a single line:
xml-printf ’%-20s $%5.2f0 invoice.xml :/invoice/ref :/invoice/total
Print a list of
all the entries associated with a particular tag:
xml-printf ’%s’ customers.xml ://name
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)
|