The DOMCount sample parses an XML file, using either a validating or non-validating DOM parser configuration, builds a DOM tree, and then counts and prints
the number of elements in the tree. To run DOMCount, enter the following:
The -v option is used when you wish to use a validating parser. Here is a sample output for DOMCount when the validating parser is used:
The output of both versions should be same.Note: The time reported by the system may be different, depending on your processor type. |