DOMFilter parses an XML document, searching for specific elements by name, or elements with specific attributes. To run the DOMFilter, type the following all on one command line:
Source code:
To run DOMFilter with the default settings, use the following command line (all on one line):
DOMFilter also allows you to change the default behavior via the following command line flags:
- -p
Specify the parser class to be used. The available parsers are: dom.wrappers.NonValidatingDOMParser
dom.wrappers.DOMParser [default parser] dom.wrappers.TXParser
- -h
Print DOMFilter help information. [default is no help]
- -e
Specify the name of the element to search for. [defaults to matching all elements]
- -a
Specify the name of the attribute to search for. [defaults to matching all attributes]
Running DOMFilter with the default settings is equivalent to running DOMFilter like this (type this in as one long command line):
Return to Samples |