xpt — a XML preprocessor
xpt [-h] [-k] [-c cmd] [-F] [-i infile] [-I dir] [-n] [-o outfile] [-s cmd] [-t stylesheet] [-T pi-name] [-f all-func] [-P init-cmd] [-D name=[=[value]]] [-x] [-v] [-V]
XPT is a XML preprocessor. * Python: if a Python function returns a none standard object, i.e. a string, an integer, a LibXML2 node, etc. xpt tries to convert it to something of a known type. In case of an instance of a certain class, a method called xpt_repr() in that class is assumed to handle this case. This method should do this conversion. Note that the returned result of xpt_repr() is allowed to be an instance of yet an other class. Even lists of instances are handled.
-c cmd enter command mode. Currently the following values are allowed: ppi process processing-instructions. this is the default value. version show version information. same as the -V. -D name[=value] define variable name optionally with value value. -f all-func register a single function for all selected XML elements. Usually needs -P option to get function installed. -F use fancy XML output format for better readability. -h show some help. -i infile read XML from infile. If not specified, standard input is assumed. If infile is explicitly specified as - (dash), the standard input is read. -I dir append dir to list search directories of xpt and embedded Python engine. -k keep temporary files -n do not execute external commands -o outfile send output to output. Note: need extra explanation how the output is created. For now read the code. -P init-cmd issue init-cmd command before transforming selected elements. Most often a module is loaded using this option. This option may be used more than once. -s cmd use XPath cmd in while creating output. -t stylesheet use XSLT stylesheet in output generation. -T pi-name change name of processing-instruction target to pi-name. Default is xpt. -x Show debug output. This option may be used more than once to increase the verbosity. -v Be verbose. -V Show version information.