A sample DOM counter. This sample program illustrates how to
traverse a DOM tree in order to get information about the document.
The output of this program shows the time and count of elements,
attributes, ignorable whitespaces, and characters appearing in
the document. Three times are shown: the parse time, the first
traversal of the document, and the second traversal of the tree.
This class is useful as a "poor-man's" performance tester to
compare the speed and accuracy of various DOM parsers. However,
it is important to note that the first parse time of a parser
will include both VM class load time and parser initialization
that would not be present in subsequent parses with the same
file.
 |
The results produced by this program should never be accepted as
true performance measurements.
|
|
|
 |  |  |  | java dom.Counter (options) uri ... |  |  |  |  |
|
|
|
Option
| Description
|
-p name
| Select parser wrapper by name.
|
-x number
| Select number of repetitions.
|
-n | -N
| Turn on/off namespace processing.
|
-np | -NP
|
Turn on/off namespace prefixes.
NOTE: Requires use of -n.
|
-v | -V
| Turn on/off validation.
|
-s | -S
|
Turn on/off Schema validation support.
NOTE: Not supported by all parsers.
|
-f | -F
|
Turn on/off Schema full checking.
NOTE: Requires use of -s and not supported by all parsers.
|
-h
| Display help screen.
|
|