Skip navigation links

Package net.sf.saxon.dom

This package provides glue classes that enable Saxon to process a source document supplied as a DOM tree in the form of a DOMSource object; it also provides classes that present a DOM view of Saxon's native tree structures.

See: Description

Package net.sf.saxon.dom Description

This package provides glue classes that enable Saxon to process a source document supplied as a DOM tree in the form of a DOMSource object; it also provides classes that present a DOM view of Saxon's native tree structures.

The native Saxon tree structures (the linked tree and tiny tree) do not implement DOM interfaces directly. However, Saxon supports the DOM at two levels:

The classes net.sf.saxon.dom.NodeWrapper and DocumentWrapper implement the Saxon interfaces NodeInfo and DocumentInfo on top of an underlying DOM Node or Document object respectively. This enables XPath expressions to be executed directly against the DOM.

The classes NodeOverNodeInfo, DocumentOverNodeInfo, and the like do the converse: they provide a DOM wrapper over a native Saxon node.

Note that using the DOM with Saxon is considerably less efficient than using Saxon's native tree implementations, the TinyTree and the LinkedTree. The DOM should be used only where there is some good reason, e.g. where other parts of the application have to use DOM interfaces.

Saxon doesn't stop you modifying the contents of the DOM in the course of a transformation (for example, from an extension function, or in a different thread) but the consequences of doing so are unpredictable.


Michael H. Kay
Saxonica Limited
July 2010

Skip navigation links

Copyright (c) 2004-2018 Saxonica Limited. All rights reserved.