xmlproc: A Python XML parser.

Using the xmlproc command-line parsers

The command-line parser is in xpcmd.py for well-formedness parsing and xvcmd.py for validating parsing.

xpcmd.py

xpcmd.py is a command-line interface to the parser. It continues parsing after even fatal errors, in order to be find more errors, since this does not mean feeding data to the application after a fatal error (which would be in violation of the spec).

Usage:

  xpcmd.py [-l language] [-o format] [-n] urltodoc

  ---Options:  
  language: ISO 3166 language code for language to use in error messages
            (no and en supported).
  format:   Format to output parsed XML. 'e': ESIS, 'x': canonical XML
            No data will be outputted if this option is not specified
  urltodoc: URL to the document to parse. (You can use plain file names
            as well.) Can be omitted if a catalog is specified and contains
            a DOCUMENT entry.
  -n:       Report qualified names as 'URI name'. (Namespace processing.)

xvcmd.py

xvcmd.py validates and has more options:

Usage:

  xvcmd.py [-c catalog] [-l language] [-o format] [-n] [urltodoc]

  ---Options:  
  catalog:  path to catalog file to use to resolve public identifiers
  language: ISO 3166 language code for language to use in error messages
  format:   Format to output parsed XML. 'e': ESIS, 'x': canonical XML
            No data will be outputted if this option is not specified
  urltodoc: URL to the document to parse. (You can use plain file names
            as well.) Can be omitted if a catalog is specified and contains
            a DOCUMENT entry.
  -n:       Report qualified names as 'URI name'. (Namespace processing.)
            
  Catalog files with URLs that end in '.xml' are assumed to be XCatalogs,
  all others are assumed to be SGML Open Catalogs.

  If the -c option is not specified the environment variables XMLXCATALOG
  and XMLSOCATALOG will be used (in that order).

07.feb.99 04:11, Lars Marius Garshol, larsga@ifi.uio.no.