| java.lang.Object com.sosnoski.xmlbench.BenchBase com.sosnoski.xmlbench.BenchDocBase com.sosnoski.xmlbench.BenchDOM
All known Subclasses: com.sosnoski.xmlbench.BenchXerces2, com.sosnoski.xmlbench.BenchXerces, com.sosnoski.xmlbench.BenchCrimson,
BenchDOM | abstract public class BenchDOM extends BenchDocBase (Code) | | Abstract base class for measuring performance of any of the DOM document
representations. Subclasses need to implement the actual document building
and text output methods, but can use the common tree walking code provided
here.
author: Dennis M. Sosnoski version: 1.2 |
BenchDOM | protected BenchDOM(String config)(Code) | | Constructor.
Parameters: config - test configuration name |
modify | protected void modify(Object doc)(Code) | | 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 |
modifyElement | protected void modifyElement(Element element)(Code) | | Modify subtree for element. This recursively walks through the document
nodes under an element, performing the modifications.
Parameters: element - element to be walked |
walk | protected void walk(Object doc, DocumentSummary summary)(Code) | | 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 |
walkElement | protected void walkElement(Element element, DocumentSummary summary)(Code) | | 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 |
|
|