xsh - XML Editing Shell
xsh [options] commands xsh [options] -al script [arguments ...] xsh [options] -p commands < input.xml > output.xml xsh [options] -I input.xml -O output.xml commands xsh [options] -P file.xml commands xsh -u for usage xsh -h for help xsh --man for the manual page
XSH is an shell-like language for XPath-oriented editing, querying and manipulation of XML and HTML files (with read-only support for DocBook SGML).
xsh can work as an interactive shell (with full command-line support such as history, TAB-completion, etc.) or as an off-line interpreter for batch processing of XML files.
For a quick help, type
xsh help (just
help on xsh prompt).
xsh help commands to get list of available XSH commands and
xsh help command with command replaced by a XSH command name to get help on a particular command.
- --load|-l script-file
Load and execute given XSH script (the script is executed before all other commands provided on the command-line, but after executed ~/.xshrc).
Command-line contains arguments accessible to the script via
@XML::XSH::Map::ARGVrather than XSH commands.
Don't display command-prompt even if run from a terminal, expecting XSH commands in the standard input.
Compile the XSH source and report errors, only. No commands are actually executed.
Quiet mode: suppress all unnecessary informatory ouptut.
Start with indent 1 (on) and keep_blanks 0 (off) to allow nice indenting of the XML output.
Start with validation, load_ext_dtd, parser_expands_entities and parser_completes_attributes 1 (on).
Start with validation, load_ext_dtd, parser_expands_entities and parser_completes_attributes 0 (off).
Print some debug messages.
Print XSH version info and exit.
Start interactive mode with xsh command prompt. By default, the interactive mode is only started if
xshis running from a terminal and neither XSH commands nor a script are given on the command-line.
Force non-interactive mode.
This is a special mode in which xsh acts as a pipe-line processing tool. In this mode, first the standard input is read and opened as a document _ (underscore), then all XSH commands given in ~/.xshrc, command-line and given XSH scripts are applied and finally the (possibly modified) document _ is dumped back on the standard output. It is equivallent to
-I - -O -and
- --input|-I filename
Preload given file as a document with ID _ upon startup.
- --output|-O filename
Try to saves document with ID _ into given file before XSH ends.
- --process|-P filename
A convenient shortcut for
-I filename -O filename.
Make XSH expect HTML documents by default in all open/save operations.
This option is included only for completeness sake. Make XSH expect XSH documents by default in all open/save operations (this is the default).
This option allows tracing the way XSH language parser processes your script.
- --query-encoding|-E encoding
Set the encoding that used in the XSH scripts (or keyboard input).
- --encoding|-e encoding
Set the encoding that should be used for XSH output.
Print a brief help message on usage and exits.
Prints the help page and exits.
Displays the help as manual page.
Petr Pajas <firstname.lastname@example.org>
Copyright 2000-2003 Petr Pajas, All rights reserved.