Package nu.validator.saxtree

This package provides SAX Tree: a tree model optimized for creation from SAX events and replay as SAX events.

See:
          Description

Class Summary
CDATA A CDATA section.
Characters A run of characters
CharBufferNode A common superclass for character buffer node classes.
Comment A comment.
Document A document.
DocumentFragment A document fragment.
DTD A doctype.
Element An element.
Entity An entity.
IgnorableWhitespace A run ignorable whitespace.
LocatorImpl A locator implementation.
Node The common node superclass.
ParentNode Common superclass for parent nodes.
PrefixMapping A prefix mapping.
ProcessingInstruction A processing instruction.
SkippedEntity A skipped entity.
TreeBuilder Builds a SAX Tree representation of a document or a fragment streamed as ContentHandler and LexicalHandler events.
TreeParser A tree visitor that replays a tree as SAX events.
 

Enum Summary
NodeType The node type.
 

Package nu.validator.saxtree Description

This package provides SAX Tree: a tree model optimized for creation from SAX events and replay as SAX events.

Design Principles

  1. Preserve information exposed through ContentHandler, LexicalHandler and Locator.
  2. Creation from SAX events or as part of the parse of a conforming HTML5 document should be fast.
  3. Emitting SAX events based on the tree should be fast.
  4. Mutations should be possible but should not make the above "fast" cases slower.
  5. Concurrent reads should work without locking when there are no concurrent mutations.
  6. The user of the API has the responsibility of using the API properly: for the sake of performance, the model does not check if it is being used properly. Improper use may, therefore, put the model in and inconsistent state.