RXP(1)
π RXP(1) π
bestie, welcome to the General Commands Manual page for rxp β the XML parser program that's literally about to make your terminal sparkle β¨
πΈ NAME πΈ
rxp β the XML parser program, no cap π
π¦ SYNOPSIS π¦
rxp [ -abemnNRsStvVx4 ] [ -o b|p|0|1|2|3|i|d ] [ U 0|1|2 ] [ -c encoding
] [ url ]
β¨ DESCRIPTION β¨
okay so here's the tea: rxp reads and parses XML from the url (or from standard input if you didn't give it one, nbd) and writes it to standard output. it can optionally expand entities, default attributes, and translate to a different output encoding β it's giving multitasking icon π
rxp accepts XML 1.0 and 1.1, and the corresponding versions of XML namespaces. it also implements the Oasis XML catalog specification, so you know it's legit π«Ά
common option combos that slay: -Nxs to check a document for well-formedness and namespace well-formedness, and -VNxs to also check for DTD-validity. periodt π
π₯ OPTIONS π₯
-aβ insert declared default values for omitted attributes. so if you forgot to put something in,rxpwill fill it in for you π-vβ be verbose. it's giving "tell me everything" energy β¨-Vβ validate the document. and bestie, if you repeat this option, the program treats validity errors as well-formedness errors and exits after the first validity error. otherwise it just prints a warning for each one. so like, one warning vs. immediate exit β choose your fighter π-dβ read the whole DTD (internal and external parts) regardless of any standalone declaration. otherwise a declaration"standalone='yes'"will prevent the external part from being read (unless validation is selected). so this flag is like "I don't care about your standalone declaration, read it all" π-Nβ enable XML namespace support. the document will be checked for correct namespace syntax, and if-bis specified, qualified element and attribute names will be displayed with their URIs. namespace vibes only π-Rβ the value of this flag is a time limit in seconds, after which the program will abort.
this is to protect against denial-of-service attacks using malicious documents. so like, set a timer bestie, because we're not about to get hacked ππ₯
-Sβ keep track ofxml:spaceattributes. this will only affect output when-bis specified. space matters, okay? π-eβ obsolete, do not use.
seriously, don't. it's giving "why is this still here" energy π
-Eβ do not expand entity references (opposite of old-eflag). so like, leave those entities alone, periodt π-sβ be silent (that is, suppress output). useful for benchmarking or if you just want to see the error messages. so it's like mute mode but for your terminal π«Ά-bβ print output as "bits". it's giving binary realness π»-nβ treat the input as normalised SGML rather than XML. not intended for general use. so like, niche vibes only π§-oβ if this flag isp, output is in the default (plain) format. if it'sb, output is printed as "bits" (equivalent to-b). if it's0, output is suppressed (equivalent to-s). if it's1,2or3, output is in first, second or third canonical form. if it'si, output is a dump of the document's infoset. if it'sd, output is in a form suitable for use with "diff"; in particular attributes are sorted into alphabetical order. so many options, so little time π-mβ merge PCData across entity references. this will only affect the output when-bis specified. merging like a boss π-tβ read in the input as a tree, rather than bits. should make no difference to the output. so like, it's a vibe, but it's a neutral vibe πΈ-ubase_uri β use the specified base URI when resolving system identifiers. URIs are important, bestie π-Uβ this flag controls Unicode normalization checking and is only relevant when parsing XML 1.1 documents. if it is0, no checking is done. if it is1,rxpchecks that the document is fully normalized as defined by the W3C character model. if it is2, the document is checked and any unknown characters (which may be ones corresponding to a newer version of Unicode thanrxpknows about) will also cause an error. unicode is a whole mood π-xβ strict XML mode. this suppresses some warnings (eg entity redefinitions) but treats all XML well-formedness errors as fatal. this flag implies the-aflag, and sets the output encoding to UTF-8 unless the-cflag is given. it sets the output format to first canonical form unless the-o,-bor-sflag is given. so strict, so iconic π-cencoding β produce output in the specified character encoding. known encodings includeISO-8859-1,UTF-8,ISO-10646-UCSandUTF-16. 16-bit encoding names may be suffixed with-Bor-Lto specify big- or little-endian byte order (the default is the host byte order). if no-cor-xoption is given, output is in the same encoding as the input document. encoding queen π-Dname sysid β force use of the document type specified by sysid. the root element name for validation is name. any DTD in the document is ignored. this flag does not imply validation; use-Vif required. so like, force it but don't validate it unless you say so π-iβ doxml:idprocessing. attributes namedxml:idare recognised as IDs even if not declared. ID vibes only π-Iβ the same as-i, but in additionxml:idattributes are checked for uniqueness. so like,-ibut extra π-zβ use a shorter format for error messages. particularly useful when using the parser in Emacs compilation mode, so that Emacs can find the error location. short and sweet, just like me π-4β use pre-fifth-edition rules for XML 1.0. XML 1.0 fifth edition extends the set of allowed name characters to match XML 1.1, and allows unrecognised version numbers of the form1.xto be treated as1.0. the-4flag disables these changes. so like, throwback rules only π°οΈ
π 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. so like, warnings are just warnings until they're not π
πΏ ENVIRONMENT πΏ
if the environment variable XML_CATALOG_FILES is set, XML catalog processing is enabled. a catalog can be used to map system and public identifiers to local files. in particular, this allows copies of common DTDs to be kept locally, so that rxp does not have to fetch them over the internet. XML_CATALOG_FILES should be set to a space-separated list of catalog files.
the variable XML_CATALOG_PREFER may be set to public or system to set the initial mode for catalog processing; the default is system.
if the variable RXPURL is set, it is used as the URL of the document to parse. this may be useful in CGI scripts and the like to avoid shell parsing of a user-supplied argument.
the variable http_proxy can be used to specify a proxy for HTTP connections. the syntax is hostname[:port]. proxy vibes only π
and that's the tea, bestie! this page is brought to you by RXP release 1.5.2 β go forth and parse some XML like the icon you are πβ¨π
π¦ where this page comes from
- nixos 26.05: rxp 1.5.2
- nixpkgs unstable: rxp 1.5.2
- opensuse-leap 16.0: rxp 1.5.2-bp160.1.12 Β· GPL-2.0-or-later
- opensuse-leap 16.0: rxp 1.5.2-bp160.1.12 Β· GPL-2.0-or-later
- opensuse-leap 16.0: rxp 1.5.2-bp160.1.12 Β· GPL-2.0-or-later
- opensuse-leap 16.0: rxp 1.5.2-bp160.1.12 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms