Abstract base class for benchmarks measuring performance of the XPP
document representation. This base class implementation can be customized
by subclasses to experiment with options for the representation, in
particular for trying the pull node feature.
This code is based on a sample provided by Aleksander Slominski.
author: Dennis M. Sosnoski version: 1.2
Modify a document representation. This implementation of the abstract
superclass method walks the document representation performing the
following modifications: remove all content segments which consist only
of whitespace; add an attribute "text" set to "true" to any elements
which directly contain non-whitespace text content; and replace each
non-whitespace text content segment with a "text" element which wraps
the trimmed content.
Parameters: doc - document representation to be modified
Modify subtree for element. This recursively walks through the document
nodes under an element, performing the modifications.
Parameters: element - element to be walked throws: XmlPullParserException - on error walking tree
Output a document as XML text. This implementation uses the method
defined by XPP to output a text representation of the document.
Parameters: doc - document representation to be output Parameters: out - XML document output stream
Walk and summarize document. This method walks through the nodes
of the document, accumulating summary information.
Parameters: doc - document representation to be walked Parameters: summary - output document summary information
Walk subtree for element. This recursively walks through the document
nodes under an element, accumulating summary information.
Parameters: element - element to be walked Parameters: summary - document summary information
Methods inherited from com.sosnoski.xmlbench.BenchDocBase