O'Reilly logo

Java and XSLT by Eric M. Burke

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

Package: javax.xml.parsers

Synopsis

The classes in this package support parsing using Simple API for XML (SAX) 2 and Document Object Model (DOM) Level 2. These classes do not perform the actual parsing work; instead, they delegate to plugable parser implementations such as Apache’s Crimson or Xerces.

DocumentBuilder

Instances of this class define an API for parsing XML from a variety of input sources, as well as for creating new DOM Document objects from scratch. The DocumentBuilder instance should be obtained from the DocumentBuilderFactory instance. Once an instance has been obtained, the newDocument( ) method can be used to construct new DOM Document objects without resorting to the implementation of specific code.

public abstract class DocumentBuilder {
    protected DocumentBuilder(  );
    public abstract DOMImplementation getDOMImplementation(  );
    public abstract boolean isNamespaceAware(  );
    public abstract boolean isValidating(  );
    public abstract Document newDocument(  );
    public Document parse(InputStream is, String systemId)
        throws SAXException, IOException;
    public Document parse(String uri)
        throws SAXException, IOException;
    public Document parse(File f)
        throws SAXException, IOException;
    public abstract Document parse(InputSource is)
        throws SAXException, IOException;
    public Document parse(InputStream is)
        throws SAXException, IOException;
    public abstract void setEntityResolver(EntityResolver er);
    public abstract void setErrorHandler(ErrorHandler eh);
}

DocumentBuilderFactory

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required