DOMFilter parses an XML document, searching for specific elements by name, or elements with specific attributes. Requirements:
Source code:
To run DOMFilter
On Windows: The easiest way to do this is to create a .bat file using the Notepad editor. Then the DOMFilter can be invoked by double clicking on the file name or icon. The following command lines assume that both the jdk and the xml4j directories are located directly below the c: dirve. set path=c:\jdk1.1.8\bin;%PATH% Switches: DOMFilter also allows you to change the default behavior via the following command line flags:
dom.wrappers.NonValidatingDOMParser dom.wrappers.DOMParser [default parser] dom.wrappers.TXParser Running DOMFilter with the default settings is equivalent to running DOMFilter like this (type this in as one long command line): java dom.DOMFilter -p dom.wrappers.DOMParser Bringing up the help information: java dom.DOMFilter -h Searching for elements: java dom.DOMFilter -e family data\personal.xml Search for all attributes: java dom.DOMFilter -a data\personal.xml Note: Parse your own XML file instead of data\personal.xml |