org.enhydra.apache.xerces.jaxp
Class DocumentBuilderImpl

java.lang.Object
  |
  +--javax.xml.parsers.DocumentBuilder
        |
        +--org.enhydra.apache.xerces.jaxp.DocumentBuilderImpl

public class DocumentBuilderImpl
extends DocumentBuilder

Version:
$Revision: 1.1.1.1 $
Author:
Rajiv Mordani, Edwin Goei

Field Summary
(package private) static java.lang.String CREATE_ENTITY_REF_NODES_FEATURE
           
(package private) static java.lang.String INCLUDE_IGNORABLE_WHITESPACE
           
(package private) static java.lang.String XERCES_FEATURE_PREFIX
          Xerces features
 
Constructor Summary
(package private) DocumentBuilderImpl(DocumentBuilderFactory dbf, java.util.Hashtable dbfAttrs)
           
 
Method Summary
 DOMImplementation getDOMImplementation()
          Obtain an instance of a DOMImplementation object.
(package private)  DOMParser getDOMParser()
           
 boolean isNamespaceAware()
          Indicates whether or not this parser is configured to understand namespaces.
 boolean isValidating()
          Indicates whether or not this parser is configured to validate XML documents.
 Document newDocument()
          Non-preferred: use the getDOMImplementation() method instead of this one to get a DOM Level 2 DOMImplementation object and then use DOM Level 2 methods to create a DOM Document object.
 Document parse(InputSource is)
          Parse the content of the given input source as an XML document and return a new DOM Document object.
 void setEntityResolver(EntityResolver er)
          Specify the EntityResolver to be used to resolve entities present in the XML document to be parsed.
 void setErrorHandler(ErrorHandler eh)
          Specify the ErrorHandler to be used to report errors present in the XML document to be parsed.
 
Methods inherited from class javax.xml.parsers.DocumentBuilder
parse, parse, parse, parse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XERCES_FEATURE_PREFIX

static final java.lang.String XERCES_FEATURE_PREFIX
Xerces features

See Also:
Constant Field Values

CREATE_ENTITY_REF_NODES_FEATURE

static final java.lang.String CREATE_ENTITY_REF_NODES_FEATURE
See Also:
Constant Field Values

INCLUDE_IGNORABLE_WHITESPACE

static final java.lang.String INCLUDE_IGNORABLE_WHITESPACE
See Also:
Constant Field Values
Constructor Detail

DocumentBuilderImpl

DocumentBuilderImpl(DocumentBuilderFactory dbf,
                    java.util.Hashtable dbfAttrs)
              throws SAXNotRecognizedException,
                     SAXNotSupportedException
Method Detail

newDocument

public Document newDocument()
Non-preferred: use the getDOMImplementation() method instead of this one to get a DOM Level 2 DOMImplementation object and then use DOM Level 2 methods to create a DOM Document object.

Specified by:
newDocument in class DocumentBuilder
Returns:
A new instance of a DOM Document object.

getDOMImplementation

public DOMImplementation getDOMImplementation()
Description copied from class: DocumentBuilder
Obtain an instance of a DOMImplementation object.

Specified by:
getDOMImplementation in class DocumentBuilder
Returns:
A new instance of a DOMImplementation.

parse

public Document parse(InputSource is)
               throws SAXException,
                      java.io.IOException
Description copied from class: DocumentBuilder
Parse the content of the given input source as an XML document and return a new DOM Document object.

Specified by:
parse in class DocumentBuilder
Parameters:
is - InputSource containing the content to be parsed.
Returns:
A new DOM Document object.
Throws:
SAXException - If any parse errors occur.
java.io.IOException - If any IO errors occur.
See Also:
DocumentHandler

isNamespaceAware

public boolean isNamespaceAware()
Description copied from class: DocumentBuilder
Indicates whether or not this parser is configured to understand namespaces.

Specified by:
isNamespaceAware in class DocumentBuilder
Returns:
true if this parser is configured to understand namespaces; false otherwise.

isValidating

public boolean isValidating()
Description copied from class: DocumentBuilder
Indicates whether or not this parser is configured to validate XML documents.

Specified by:
isValidating in class DocumentBuilder
Returns:
true if this parser is configured to validate XML documents; false otherwise.

setEntityResolver

public void setEntityResolver(EntityResolver er)
Description copied from class: DocumentBuilder
Specify the EntityResolver to be used to resolve entities present in the XML document to be parsed. Setting this to null will result in the underlying implementation using it's own default implementation and behavior.

Specified by:
setEntityResolver in class DocumentBuilder
Parameters:
er - The EntityResolver to be used to resolve entities present in the XML document to be parsed.

setErrorHandler

public void setErrorHandler(ErrorHandler eh)
Description copied from class: DocumentBuilder
Specify the ErrorHandler to be used to report errors present in the XML document to be parsed. Setting this to null will result in the underlying implementation using it's own default implementation and behavior.

Specified by:
setErrorHandler in class DocumentBuilder
Parameters:
eh - The ErrorHandler to be used to report errors present in the XML document to be parsed.

getDOMParser

DOMParser getDOMParser()


Copyright © 1999 The Apache Software Foundation. All Rights reserved.