Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
javax.xml.parsers

Class DocumentBuilder

java.lang.Object
|
+--javax.xml.parsers.DocumentBuilder


public abstract class DocumentBuilder

extends Object

Uses an XML parser to construct a DOM document.

Author:

Constructor Summary

DocumentBuilder()

Only subclasses may use the constructor.

Method Summary

org.w3c.dom.DOMImplementationgetDOMImplementation()

booleanisNamespaceAware()

booleanisValidating()

org.w3c.dom.DocumentnewDocument()

org.w3c.dom.Documentparse(java.io.File file)

Constructs an InputSource from the file, and invokes parse ().
org.w3c.dom.Documentparse(org.xml.sax.InputSource source)

org.w3c.dom.Documentparse(java.io.InputStream stream)

Avoid using this call; provide the system ID wherever possible.
org.w3c.dom.Documentparse(java.io.InputStream stream, java.lang.String systemID)

org.w3c.dom.Documentparse(java.lang.String uri)

voidsetEntityResolver(org.xml.sax.EntityResolver resolver)

voidsetErrorHandler(org.xml.sax.ErrorHandler handler)

Constructor Details

DocumentBuilder

protected DocumentBuilder()

Only subclasses may use the constructor.


Method Details

getDOMImplementation

public DOMImplementation getDOMImplementation()


isNamespaceAware

public boolean isNamespaceAware()


isValidating

public boolean isValidating()


newDocument

public Document newDocument()


parse

public Document parse(java.io.File file)

Constructs an InputSource from the file, and invokes parse (). The InputSource includes the URI for the file.

Parameters:


parse

public Document parse(java.io.InputStream stream)

Avoid using this call; provide the system ID wherever possible. System IDs are essential when parsers resolve relative URIs, or provide diagnostics.

Parameters:


parse

public Document parse(java.io.InputStream stream, java.lang.String systemID)

Parameters:


parse

public Document parse(java.lang.String uri)

Parameters:


parse

public Document parse(org.xml.sax.InputSource source)

Parameters:


setEntityResolver

public void setEntityResolver(org.xml.sax.EntityResolver resolver)

Parameters:


setErrorHandler

public void setErrorHandler(org.xml.sax.ErrorHandler handler)

Parameters: