| |
| Usage: |
| SAXCount [options] <XML file> |
| |
| Options: |
| -v=xxx Validation scheme [always | never | auto*] |
| -n Enable namespace processing. Defaults to off. |
| -s Enable schema processing. Defaults to off. |
| |
| This program prints the number of elements, attributes, |
| white spaces and other non-white space characters in the input file. |
| |
| * = Default if not provided explicitly |
| |
| personal.xml:{timing removed}(37 elems, 12 attrs, 0 spaces, 268 chars) |
| personal.xml:{timing removed}(37 elems, 12 attrs, 134 spaces, 134 chars) |
| |
| Usage: SAXPrint [options] file |
| This program prints the data returned by the various SAX |
| handlers for the specified input file. Options are NOT case |
| sensitive. |
| |
| Options: |
| -u=xxx Handle unrepresentable chars [fail | rep | ref*] |
| -v=xxx Validation scheme [always | never | auto*] |
| -n Enable namespace processing. |
| -s Enable schema processing. |
| -x=XXX Use a particular encoding for output (LATIN1*). |
| -? Show this help |
| |
| * = Default if not provided explicitly |
| |
| The parser has intrinsic support for the following encodings: |
| UTF-8, USASCII, ISO8859-1, UTF-16[BL]E, UCS-4[BL]E, |
| WINDOWS-1252, IBM1140, IBM037 |
| |
| <?xml version="1.0" encoding="LATIN1"?> |
| <personnel> |
| |
| <person id="Big.Boss"> |
| <name><family>Boss</family> <given>Big</given></name> |
| <email>chief@foo.com</email> |
| <link subordinates="one.worker two.worker three.worker four.worker five.worker"></link> |
| </person> |
| |
| <person id="one.worker"> |
| <name><family>Worker</family> <given>One</given></name> |
| <email>one@foo.com</email> |
| <link manager="Big.Boss"></link> |
| </person> |
| |
| <person id="two.worker"> |
| <name><family>Worker</family> <given>Two</given></name> |
| <email>two@foo.com</email> |
| <link manager="Big.Boss"></link> |
| </person> |
| |
| <person id="three.worker"> |
| <name><family>Worker</family> <given>Three</given></name> |
| <email>three@foo.com</email> |
| <link manager="Big.Boss"></link> |
| </person> |
| |
| <person id="four.worker"> |
| <name><family>Worker</family> <given>Four</given></name> |
| <email>four@foo.com</email> |
| <link manager="Big.Boss"></link> |
| </person> |
| |
| <person id="five.worker"> |
| <name><family>Worker</family> <given>Five</given></name> |
| <email>five@foo.com</email> |
| <link manager="Big.Boss"></link> |
| </person> |
| |
| </personnel><?xml version="1.0" encoding="LATIN1"?> |
| <personnel> |
| |
| <person id="Big.Boss"> |
| <name><family>Boss</family> <given>Big</given></name> |
| <email>chief@foo.com</email> |
| <link subordinates="one.worker two.worker three.worker four.worker five.worker"></link> |
| </person> |
| |
| <person id="one.worker"> |
| <name><family>Worker</family> <given>One</given></name> |
| <email>one@foo.com</email> |
| <link manager="Big.Boss"></link> |
| </person> |
| |
| <person id="two.worker"> |
| <name><family>Worker</family> <given>Two</given></name> |
| <email>two@foo.com</email> |
| <link manager="Big.Boss"></link> |
| </person> |
| |
| <person id="three.worker"> |
| <name><family>Worker</family> <given>Three</given></name> |
| <email>three@foo.com</email> |
| <link manager="Big.Boss"></link> |
| </person> |
| |
| <person id="four.worker"> |
| <name><family>Worker</family> <given>Four</given></name> |
| <email>four@foo.com</email> |
| <link manager="Big.Boss"></link> |
| </person> |
| |
| <person id="five.worker"> |
| <name><family>Worker</family> <given>Five</given></name> |
| <email>five@foo.com</email> |
| <link manager="Big.Boss"></link> |
| </person> |
| |
| </personnel> |
| Usage: |
| SAX2Count [options] <XML file> |
| |
| Options: |
| -v=xxx Validation scheme [always | never | auto*] |
| -n Disable namespace processing. Defaults to on. |
| -s Disable schema processing. Defaults to on. |
| |
| This program prints the number of elements, attributes, |
| white spaces and other non-white space characters in the input file. |
| |
| * = Default if not provided explicitly |
| |
| personal.xml:{timing removed}(37 elems, 12 attrs, 0 spaces, 268 chars) |
| personal.xml:{timing removed}(37 elems, 12 attrs, 134 spaces, 134 chars) |
| |
| Usage: SAX2Print [options] file |
| This program prints the data returned by the various SAX2 |
| handlers for the specified input file. Options are NOT case |
| sensitive. |
| |
| Options: |
| -u=xxx Handle unrepresentable chars [fail | rep | ref*] |
| -v=xxx Validation scheme [always | never | auto*] |
| -e Expand Namespace Alias with URI's. |
| -x=XXX Use a particular encoding for output (LATIN1*). |
| -? Show this help |
| |
| * = Default if not provided explicitly |
| |
| The parser has intrinsic support for the following encodings: |
| UTF-8, USASCII, ISO8859-1, UTF-16[BL]E, UCS-4[BL]E, |
| WINDOWS-1252, IBM1140, IBM037 |
| |
| <?xml version="1.0" encoding="LATIN1"?> |
| <personnel> |
| |
| <person id="Big.Boss"> |
| <name><family>Boss</family> <given>Big</given></name> |
| <email>chief@foo.com</email> |
| <link subordinates="one.worker two.worker three.worker four.worker five.worker"></link> |
| </person> |
| |
| <person id="one.worker"> |
| <name><family>Worker</family> <given>One</given></name> |
| <email>one@foo.com</email> |
| <link manager="Big.Boss"></link> |
| </person> |
| |
| <person id="two.worker"> |
| <name><family>Worker</family> <given>Two</given></name> |
| <email>two@foo.com</email> |
| <link manager="Big.Boss"></link> |
| </person> |
| |
| <person id="three.worker"> |
| <name><family>Worker</family> <given>Three</given></name> |
| <email>three@foo.com</email> |
| <link manager="Big.Boss"></link> |
| </person> |
| |
| <person id="four.worker"> |
| <name><family>Worker</family> <given>Four</given></name> |
| <email>four@foo.com</email> |
| <link manager="Big.Boss"></link> |
| </person> |
| |
| <person id="five.worker"> |
| <name><family>Worker</family> <given>Five</given></name> |
| <email>five@foo.com</email> |
| <link manager="Big.Boss"></link> |
| </person> |
| |
| </personnel><?xml version="1.0" encoding="LATIN1"?> |
| <personnel> |
| |
| <person id="Big.Boss"> |
| <name><family>Boss</family> <given>Big</given></name> |
| <email>chief@foo.com</email> |
| <link subordinates="one.worker two.worker three.worker four.worker five.worker"></link> |
| </person> |
| |
| <person id="one.worker"> |
| <name><family>Worker</family> <given>One</given></name> |
| <email>one@foo.com</email> |
| <link manager="Big.Boss"></link> |
| </person> |
| |
| <person id="two.worker"> |
| <name><family>Worker</family> <given>Two</given></name> |
| <email>two@foo.com</email> |
| <link manager="Big.Boss"></link> |
| </person> |
| |
| <person id="three.worker"> |
| <name><family>Worker</family> <given>Three</given></name> |
| <email>three@foo.com</email> |
| <link manager="Big.Boss"></link> |
| </person> |
| |
| <person id="four.worker"> |
| <name><family>Worker</family> <given>Four</given></name> |
| <email>four@foo.com</email> |
| <link manager="Big.Boss"></link> |
| </person> |
| |
| <person id="five.worker"> |
| <name><family>Worker</family> <given>Five</given></name> |
| <email>five@foo.com</email> |
| <link manager="Big.Boss"></link> |
| </person> |
| |
| </personnel> |
| Finished parsing the memory buffer containing the following XML statements: |
| |
| <?xml version='1.0' encoding='ascii'?> |
| <!DOCTYPE company [ |
| <!ELEMENT company (product,category,developedAt)> |
| <!ELEMENT product (#PCDATA)> |
| <!ELEMENT category (#PCDATA)> |
| <!ATTLIST category idea CDATA #IMPLIED> |
| <!ELEMENT developedAt (#PCDATA)> |
| ]> |
| |
| <company> |
| <product>XML4C</product> |
| <category idea='great'>XML Parsing Tools</category> |
| <developedAt> |
| IBM Center for Java Technology, Silicon Valley, Cupertino, CA |
| </developedAt> |
| </company> |
| |
| |
| Parsing took{timing removed}(4 elements, 1 attributes, 16 spaces, 95 characters). |
| |
| |
| Finished parsing the memory buffer containing the following XML statements: |
| |
| <?xml version='1.0' encoding='ascii'?> |
| <!DOCTYPE company [ |
| <!ELEMENT company (product,category,developedAt)> |
| <!ELEMENT product (#PCDATA)> |
| <!ELEMENT category (#PCDATA)> |
| <!ATTLIST category idea CDATA #IMPLIED> |
| <!ELEMENT developedAt (#PCDATA)> |
| ]> |
| |
| <company> |
| <product>XML4C</product> |
| <category idea='great'>XML Parsing Tools</category> |
| <developedAt> |
| IBM Center for Java Technology, Silicon Valley, Cupertino, CA |
| </developedAt> |
| </company> |
| |
| |
| Parsing took{timing removed}(4 elements, 1 attributes, 0 spaces, 111 characters). |
| |
| |
| Usage: |
| Redirect <XML file> |
| |
| This program installs an entity resolver, traps the call to |
| the external DTD file and redirects it to another application |
| specific file which contains the actual dtd. |
| |
| The program then counts and reports the number of elements and |
| attributes in the given XML file. |
| |
| personal.xml:{timing removed}(37 elems, 12 attrs, 0 spaces, 268 chars) |
| |
| Usage: |
| DOMCount [-v -n] {XML file} |
| |
| This program invokes the XML4C DOM parser, builds |
| the DOM tree, and then prints the number of elements |
| found in the input XML file. |
| |
| Options: |
| -v=xxx Validation scheme [always | never | auto*] |
| -n Enable namespace processing. Defaults to off. |
| -s Enable schema processing. Defaults to off. |
| |
| * = Default if not provided explicitly |
| |
| |
| personal.xml:{timing removed}(37 elems). |
| personal.xml:{timing removed}(37 elems). |
| |
| Usage: DOMPrint [options] file |
| |
| This program invokes the Xerces-C DOM parser and builds the DOM |
| tree. It then traverses the DOM tree and prints the contents |
| of the tree. Options are NOT case sensitive. |
| |
| Options: |
| -e create entity reference nodes. Default is no expansion. |
| -u=xxx Handle unrepresentable chars [fail | rep | ref*] |
| -v=xxx Validation scheme [always | never | auto*] |
| -n Enable namespace processing. Default is off. |
| -s Enable schema processing. Default is off. |
| -x=XXX Use a particular encoding for output. Default is |
| the same encoding as the input XML file. UTF-8 if |
| input XML file has not XML declaration. |
| -? Show this help (must be the only parameter) |
| |
| * = Default if not provided explicitly |
| |
| The parser has intrinsic support for the following encodings: |
| UTF-8, USASCII, ISO8859-1, UTF-16[BL]E, UCS-4[BL]E, |
| WINDOWS-1252, IBM1140, IBM037 |
| |
| <?xml version="1.0" encoding="iso-8859-1"?> |
| |
| <!DOCTYPE personnel SYSTEM "personal.dtd"> |
| <!-- @version: --> |
| <personnel> |
| |
| <person id="Big.Boss"> |
| <name><family>Boss</family> <given>Big</given></name> |
| <email>chief@foo.com</email> |
| <link subordinates="one.worker two.worker three.worker four.worker five.worker"/> |
| </person> |
| |
| <person id="one.worker"> |
| <name><family>Worker</family> <given>One</given></name> |
| <email>one@foo.com</email> |
| <link manager="Big.Boss"/> |
| </person> |
| |
| <person id="two.worker"> |
| <name><family>Worker</family> <given>Two</given></name> |
| <email>two@foo.com</email> |
| <link manager="Big.Boss"/> |
| </person> |
| |
| <person id="three.worker"> |
| <name><family>Worker</family> <given>Three</given></name> |
| <email>three@foo.com</email> |
| <link manager="Big.Boss"/> |
| </person> |
| |
| <person id="four.worker"> |
| <name><family>Worker</family> <given>Four</given></name> |
| <email>four@foo.com</email> |
| <link manager="Big.Boss"/> |
| </person> |
| |
| <person id="five.worker"> |
| <name><family>Worker</family> <given>Five</given></name> |
| <email>five@foo.com</email> |
| <link manager="Big.Boss"/> |
| </person> |
| |
| </personnel> |
| |
| <?xml version="1.0" encoding="iso-8859-1"?> |
| |
| <!DOCTYPE personnel SYSTEM "personal.dtd"> |
| <!-- @version: --> |
| <personnel> |
| |
| <person id="Big.Boss"> |
| <name><family>Boss</family> <given>Big</given></name> |
| <email>chief@foo.com</email> |
| <link subordinates="one.worker two.worker three.worker four.worker five.worker"/> |
| </person> |
| |
| <person id="one.worker"> |
| <name><family>Worker</family> <given>One</given></name> |
| <email>one@foo.com</email> |
| <link manager="Big.Boss"/> |
| </person> |
| |
| <person id="two.worker"> |
| <name><family>Worker</family> <given>Two</given></name> |
| <email>two@foo.com</email> |
| <link manager="Big.Boss"/> |
| </person> |
| |
| <person id="three.worker"> |
| <name><family>Worker</family> <given>Three</given></name> |
| <email>three@foo.com</email> |
| <link manager="Big.Boss"/> |
| </person> |
| |
| <person id="four.worker"> |
| <name><family>Worker</family> <given>Four</given></name> |
| <email>four@foo.com</email> |
| <link manager="Big.Boss"/> |
| </person> |
| |
| <person id="five.worker"> |
| <name><family>Worker</family> <given>Five</given></name> |
| <email>five@foo.com</email> |
| <link manager="Big.Boss"/> |
| </person> |
| |
| </personnel> |
| |
| stdin:{timing removed}(37 elems, 12 attrs, 134 spaces, 134 chars) |
| stdin:{timing removed}(37 elems, 12 attrs, 0 spaces, 268 chars) |
| |
| Usage: PParse [options] <file> |
| |
| This sample program demonstrates the progressive parse capabilities of |
| the parser system. It allows you to do a scanFirst() call followed by |
| a loop which calls scanNext(). You can drop out when you've found what |
| ever it is you want. In our little test, our event handler looks for |
| 16 new elements then sets a flag to indicate its found what it wants. |
| At that point, our progressive parse loop exits. |
| |
| Options: |
| -v=xxx - Validation scheme [always | never | auto*] |
| -n - Enable namespace processing [default is off] |
| -s - Enable schema processing [default is off] |
| -? - Show this help (must be the only parameter) |
| |
| * = Default if not provided explicitly |
| |
| Got the required 16 elements |
| |
| |
| Usage: |
| EnumVal <XML file> |
| |
| This program parses a file, then shows how to enumerate the |
| contents of the validator pools. Essentially, shows how one can |
| access the DTD information stored in internal data structures. |
| |
| * = Default if not provided explicitly |
| |
| |
| ELEMENTS: |
| ---------------------------- |
| Name: personnel |
| Content Model: (person)+ |
| |
| Name: person |
| Content Model: (name,email*,url*,link?) |
| Attributes: |
| Name:id, Type: ID |
| |
| Name: name |
| Content Model: (#PCDATA|family|given)* |
| |
| Name: email |
| Content Model: (#PCDATA)* |
| |
| Name: url |
| Content Model: EMPTY |
| Attributes: |
| Name:href, Type: CDATA |
| |
| Name: link |
| Content Model: EMPTY |
| Attributes: |
| Name:subordinates, Type: IDREF(S) |
| Name:manager, Type: IDREF(S) |
| |
| Name: family |
| Content Model: (#PCDATA)* |
| |
| Name: given |
| Content Model: (#PCDATA)* |
| |