man rxp (Commandes) - XML parser program

NAME

rxp - XML parser program

SYNOPSIS

rxp [ -avVEsbnmtx ] [ -o b|p|0|1|2|3 ] [ -c encoding ] [ url ]

DESCRIPTION

rxp reads and parses XML from the url (or standard input if none is provided) and writes it to standard output, optionally expanding entities, defaulting attributes, and translating to a different output encoding.

OPTIONS

-a
Insert declared default values for omitted attributes.
-v
Be verbose.
-V
Validate the document. Repeating this option will make the program treat validity errors as well-formedness errors, and exit after the first validity error (otherwise a warning will be printed for each one).
-N
Enable XML namespace support. The document will be checked for correct namespace syntax, and if -b is specified qualified element and attribute names will be displayed with their URIs.
-S
Keep track of xml:space attributes. This will only affect output when -b is specified.
-e
Obsolete, do not use.
-E
Do not expand entity references (opposite of old -e flag)
-s
Be silent (that is, suppress output). Useful for benchmarking.
-b
Print output as "bits".
-n
Treat the input as normalised SGML rather than XML. Not intended for general use.
-o
If this flag is p, output is in the default (plain) format. If it is b, output is printed as "bits" (equivalent to -b). If it is 0, output is suppressed (equivalent to -s). If it is 1, 2 or 3, output is in first, second or third canonical form.
-m
Merge PCData across entity references. This will only affect the output when -b is specified.
-t
Read in the input as a tree, rather than bits. Should make no difference to the output.
-x
XML well-formedness checking mode. Suppress most warnings but treat all XML well-formedness errors as fatal. This flag implies the -a flag, and sets the output encoding to UTF-8 unless the -c flag is given. It sets the output format to first canonical form unless the -o, -b or -s flag is given.
-c encoding
Produce output in the specified character encoding. Known encodings include ISO-8859-1, UTF-8, ISO-10646-UCS and UTF-16. 16-bit encoding names my be suffixed with -B or -L to specify big- or little-endian byte order (the default is the host byte order). If no -c or -x option is given, output is in the same encoding as the input document.

EXIT STATUS

If the -V flag is given, and the document is well-formed but not valid, 2 is returned. If the document is not well-formed, or a system error occurs, 1 is returned. Otherwise 0 is returned. Since the parser can expand external entities even when not validating, it treats certain errors which are technically validity errors as well-formedness errors. If -x is not specified, some well-formedness errors produce only warnings and do not affect the exit status.