| java.lang.Object com.sosnoski.xmlbench.BenchBase com.sosnoski.xmlbench.BenchDocBase com.sosnoski.xmlbench.BenchElectric
BenchElectric | public class BenchElectric extends BenchDocBase (Code) | | Benchmark for measuring performance of the Electric XML document
representation.
author: Dennis M. Sosnoski version: 1.2 |
BenchElectric | public BenchElectric()(Code) | | Constructor.
|
build | protected Object build(InputStream in)(Code) | | Build document representation by parsing XML. This implementation uses
the method defined by Electric DOM to build the document from an input
stream. Note that Electric DOM supports other methods for constructing
the document, but an input stream is considered the most representative
of real applications.
Parameters: in - XML document input stream document representation |
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 |
output | protected void output(Object doc, OutputStream out)(Code) | | Output a document as XML text. This implementation uses the method
defined by Electric DOM to output a text representation of the document.
Parameters: doc - document representation to be output Parameters: out - XML document output stream |
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 |
|
|