Name

Package: javax.xml.transform.dom

Synopsis

This package defines how to perform transformations using DOM.

DOMLocator

This interface allows applications to locate the DOM node where an error occurs. Since TransformerException returns instances of SourceLocator, applications must downcast to obtain DOMLocator objects.

public interface DOMLocator
        extends SourceLocator {
    Node getOriginatingNode(  );
}

DOMResult

This class allows transformation results to be stored in a DOM tree. If the default constructor is used, the XSLT processor creates a DOM Document node. Otherwise, applications can specify a DOM Document, DocumentFragment, or Element node as the constructor parameter.

The FEATURE constant is used with TransformerFactory.getFeature( ) to determine if the factory supports DOMResult.

public class DOMResult
        implements Result {
    public static final String FEATURE = 
        "http://javax.xml.transform.dom.DOMResult/feature";
    public DOMResult(Node node);
    public DOMResult(Node node, String systemId);
    public DOMResult(  );
    public Node getNode(  );
    public String getSystemId(  );
    public void setNode(Node node);
    public void setSystemId(String systemId);
}

DOMSource

This class allows a DOM tree to be used as an input source. In practice, the node parameter is usually an instance of a DOM Document. However, XSLT processors may also support any other type of DOM Node. The system id is still important for resolving relative URI references.

public class DOMSource implements Source { public static final ...

Get Java and XSLT now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.