Top Fields Constructors Methods
com.sun.org.apache.xerces.internal.jaxp

public Class DocumentBuilderImpl

extends DocumentBuilder
implements JAXPConstants
Class Inheritance
All Implemented Interfaces
com.sun.org.apache.xerces.internal.jaxp.JAXPConstants
Imports
java.io.IOException, java.util.Iterator, .Map, javax.xml.parsers.DocumentBuilder, javax.xml.validation.Schema, javax.xml.XMLConstants, com.sun.org.apache.xerces.internal.dom.DOMImplementationImpl, .DOMMessageFormatter, com.sun.org.apache.xerces.internal.impl.Constants, com.sun.org.apache.xerces.internal.impl.validation.ValidationManager, com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator, com.sun.org.apache.xerces.internal.jaxp.validation.XSGrammarPoolContainer, com.sun.org.apache.xerces.internal.parsers.DOMParser, com.sun.org.apache.xerces.internal.utils.XMLSecurityPropertyManager, .XMLSecurityPropertyManager.Property, .XMLSecurityPropertyManager.State, com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler, com.sun.org.apache.xerces.internal.xni.parser.XMLComponent, .XMLComponentManager, .XMLConfigurationException, .XMLDocumentSource, .XMLParserConfiguration, jdk.xml.internal.JdkConstants, .JdkProperty, .XMLSecurityManager, org.w3c.dom.DOMImplementation, .Document, org.xml.sax.EntityResolver, .ErrorHandler, .InputSource, .SAXException, .SAXNotRecognizedException, .SAXNotSupportedException

Authors
Rajiv Mordani, Edwin Goei

Field Summary

Modifier and TypeField and Description
public static final String
ACCESS_EXTERNAL_DTD

property identifier: access external dtd.

public static final String
ACCESS_EXTERNAL_SCHEMA

Property identifier: access to external schema

private static final String
CREATE_CDATA_NODES_FEATURE

Feature identifier: create cdata nodes feature.

private static final String
CREATE_ENTITY_REF_NODES_FEATURE

Feature identifier: create entiry ref nodes feature.

private final DOMParser
private final EntityResolver
fInitEntityResolver

Initial EntityResolver

private final ErrorHandler
fInitErrorHandler

Initial ErrorHandler

private final ValidationManager
private final XMLComponent
private final XMLComponentManager
private XMLSecurityManager
private XMLSecurityPropertyManager
private final UnparsedEntityHandler
private final Schema
private static final String
INCLUDE_COMMENTS_FEATURE

Feature identifier: include comments feature.

private static final String
INCLUDE_IGNORABLE_WHITESPACE

Feature identifier: include ignorable white space.

private static final String
NAMESPACES_FEATURE

Feature identifier: namespaces.

private static final String
SECURITY_MANAGER

Property identifier: security manager.

private static final String
VALIDATION_FEATURE

Feature identifier: validation

private static final String
XINCLUDE_FEATURE

Feature identifier: XInclude processing

private static final String
XML_SECURITY_PROPERTY_MANAGER

Property identifier: Security property manager.

private static final String
XMLSCHEMA_VALIDATION_FEATURE

feature identifier: XML Schema validation

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv
DocumentBuilderImpl(DocumentBuilderFactoryImpl dbf, Map<String, Object> dbfAttrs, Map<String, Boolean> features, boolean secureProcessing)

Method Summary

Modifier and TypeMethod and Description
public DOMImplementation
pack-priv DOMParser
public Schema
getSchema()

Overrides javax.xml.parsers.DocumentBuilder.getSchema.

Get a reference to the Schema being used by the XML processor.

public boolean
isNamespaceAware()

Implements abstract javax.xml.parsers.DocumentBuilder.isNamespaceAware.

Indicates whether or not this parser is configured to understand namespaces.

public boolean
isValidating()

Implements abstract javax.xml.parsers.DocumentBuilder.isValidating.

Indicates whether or not this parser is configured to validate XML documents.

public boolean

Returns:

the state of XInclude processing mode
isXIncludeAware
()

Overrides javax.xml.parsers.DocumentBuilder.isXIncludeAware.

Gets the XInclude processing mode for this parser

public Document
newDocument()

Implements abstract javax.xml.parsers.DocumentBuilder.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.

public Document
parse(InputSource
InputSource containing the content to be parsed.
is
)

Implements abstract javax.xml.parsers.DocumentBuilder.parse.

Parse the content of the given input source as an XML document and return a new DOM Document object.

public void
reset()

Overrides javax.xml.parsers.DocumentBuilder.reset.

Reset this DocumentBuilder to its original configuration.

private void
private void
setDocumentBuilderFactoryAttributes(Map<String, Object> dbfAttrs)

Set any DocumentBuilderFactory attributes of our underlying DOMParser Note: code does not handle possible conflicts between DOMParser attribute names and JAXP specific attribute names, eg.

public void
setEntityResolver(EntityResolver
The EntityResolver to be used to resolve entities present in the XML document to be parsed.
er
)

Implements abstract javax.xml.parsers.DocumentBuilder.setEntityResolver.

Specify the EntityResolver to be used to resolve entities present in the XML document to be parsed.

public void
setErrorHandler(ErrorHandler
The ErrorHandler to be used by the parser.
eh
)

Implements abstract javax.xml.parsers.DocumentBuilder.setErrorHandler.

Specify the ErrorHandler to be used by the parser.

private void
Inherited from javax.xml.parsers.DocumentBuilder:
parseparseparseparse

Field Detail

ACCESS_EXTERNAL_DTDback to summary
public static final String ACCESS_EXTERNAL_DTD

property identifier: access external dtd.

ACCESS_EXTERNAL_SCHEMAback to summary
public static final String ACCESS_EXTERNAL_SCHEMA

Property identifier: access to external schema

CREATE_CDATA_NODES_FEATUREback to summary
private static final String CREATE_CDATA_NODES_FEATURE

Feature identifier: create cdata nodes feature.

CREATE_ENTITY_REF_NODES_FEATUREback to summary
private static final String CREATE_ENTITY_REF_NODES_FEATURE

Feature identifier: create entiry ref nodes feature.

domParserback to summary
private final DOMParser domParser
fInitEntityResolverback to summary
private final EntityResolver fInitEntityResolver

Initial EntityResolver

fInitErrorHandlerback to summary
private final ErrorHandler fInitErrorHandler

Initial ErrorHandler

fSchemaValidationManagerback to summary
private final ValidationManager fSchemaValidationManager
fSchemaValidatorback to summary
private final XMLComponent fSchemaValidator
fSchemaValidatorComponentManagerback to summary
private final XMLComponentManager fSchemaValidatorComponentManager
fSecurityManagerback to summary
private XMLSecurityManager fSecurityManager
fSecurityPropertyMgrback to summary
private XMLSecurityPropertyManager fSecurityPropertyMgr
fUnparsedEntityHandlerback to summary
private final UnparsedEntityHandler fUnparsedEntityHandler
grammarback to summary
private final Schema grammar
INCLUDE_COMMENTS_FEATUREback to summary
private static final String INCLUDE_COMMENTS_FEATURE

Feature identifier: include comments feature.

INCLUDE_IGNORABLE_WHITESPACEback to summary
private static final String INCLUDE_IGNORABLE_WHITESPACE

Feature identifier: include ignorable white space.

NAMESPACES_FEATUREback to summary
private static final String NAMESPACES_FEATURE

Feature identifier: namespaces.

SECURITY_MANAGERback to summary
private static final String SECURITY_MANAGER

Property identifier: security manager.

VALIDATION_FEATUREback to summary
private static final String VALIDATION_FEATURE

Feature identifier: validation

XINCLUDE_FEATUREback to summary
private static final String XINCLUDE_FEATURE

Feature identifier: XInclude processing

XML_SECURITY_PROPERTY_MANAGERback to summary
private static final String XML_SECURITY_PROPERTY_MANAGER

Property identifier: Security property manager.

XMLSCHEMA_VALIDATION_FEATUREback to summary
private static final String XMLSCHEMA_VALIDATION_FEATURE

feature identifier: XML Schema validation

Constructor Detail

DocumentBuilderImplback to summary
pack-priv DocumentBuilderImpl(DocumentBuilderFactoryImpl dbf, Map<String, Object> dbfAttrs, Map<String, Boolean> features) throws SAXNotRecognizedException, SAXNotSupportedException
DocumentBuilderImplback to summary
pack-priv DocumentBuilderImpl(DocumentBuilderFactoryImpl dbf, Map<String, Object> dbfAttrs, Map<String, Boolean> features, boolean secureProcessing) throws SAXNotRecognizedException, SAXNotSupportedException

Method Detail

getDOMImplementationback to summary
public DOMImplementation getDOMImplementation()

Implements abstract javax.xml.parsers.DocumentBuilder.getDOMImplementation.

Doc from javax.xml.parsers.DocumentBuilder.getDOMImplementation.

Obtain an instance of a DOMImplementation object.

Returns:DOMImplementation

A new instance of a DOMImplementation.

getDOMParserback to summary
pack-priv DOMParser getDOMParser()
getSchemaback to summary
public Schema getSchema()

Overrides javax.xml.parsers.DocumentBuilder.getSchema.

Doc from javax.xml.parsers.DocumentBuilder.getSchema.

Get a reference to the Schema being used by the XML processor.

If no schema is being used, null is returned.

Returns:Schema

Schema being used or null if none in use

isNamespaceAwareback to summary
public boolean isNamespaceAware()

Implements abstract javax.xml.parsers.DocumentBuilder.isNamespaceAware.

Doc from javax.xml.parsers.DocumentBuilder.isNamespaceAware.

Indicates whether or not this parser is configured to understand namespaces.

Returns:boolean

true if this parser is configured to understand namespaces; false otherwise.

isValidatingback to summary
public boolean isValidating()

Implements abstract javax.xml.parsers.DocumentBuilder.isValidating.

Doc from javax.xml.parsers.DocumentBuilder.isValidating.

Indicates whether or not this parser is configured to validate XML documents.

Returns:boolean

true if this parser is configured to validate XML documents; false otherwise.

isXIncludeAwareback to summary
public boolean isXIncludeAware()

Overrides javax.xml.parsers.DocumentBuilder.isXIncludeAware.

Gets the XInclude processing mode for this parser

Returns:boolean

the state of XInclude processing mode

newDocumentback to summary
public Document newDocument()

Implements abstract javax.xml.parsers.DocumentBuilder.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.

Returns:Document

Doc from javax.xml.parsers.DocumentBuilder.newDocument.

A new instance of a DOM Document object.

parseback to summary
public Document parse(InputSource is) throws SAXException, IOException

Implements abstract javax.xml.parsers.DocumentBuilder.parse.

Doc from javax.xml.parsers.DocumentBuilder.parse.

Parse the content of the given input source as an XML document and return a new DOM Document object. An IllegalArgumentException is thrown if the InputSource is null.

Parameters
is:InputSource

InputSource containing the content to be parsed.

Returns:Document

A new DOM Document object.

Exceptions
SAXException:
If any parse errors occur.
IOException:
If any IO errors occur.
resetback to summary
public void reset()

Overrides javax.xml.parsers.DocumentBuilder.reset.

Doc from javax.xml.parsers.DocumentBuilder.reset.

Reset this DocumentBuilder to its original configuration.

DocumentBuilder is reset to the same state as when it was created with DocumentBuilderFactory#newDocumentBuilder(). reset() is designed to allow the reuse of existing DocumentBuilders thus saving resources associated with the creation of new DocumentBuilders.

The reset DocumentBuilder is not guaranteed to have the same EntityResolver or ErrorHandler Objects, e.g. Object#equals(Object obj). It is guaranteed to have a functionally equal EntityResolver and ErrorHandler.

resetSchemaValidatorback to summary
private void resetSchemaValidator() throws SAXException
setDocumentBuilderFactoryAttributesback to summary
private void setDocumentBuilderFactoryAttributes(Map<String, Object> dbfAttrs) throws SAXNotSupportedException, SAXNotRecognizedException

Set any DocumentBuilderFactory attributes of our underlying DOMParser Note: code does not handle possible conflicts between DOMParser attribute names and JAXP specific attribute names, eg. DocumentBuilderFactory.setValidating()

setEntityResolverback to summary
public void setEntityResolver(EntityResolver er)

Implements abstract javax.xml.parsers.DocumentBuilder.setEntityResolver.

Doc from javax.xml.parsers.DocumentBuilder.setEntityResolver.

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.

Parameters
er:EntityResolver

The EntityResolver to be used to resolve entities present in the XML document to be parsed.

setErrorHandlerback to summary
public void setErrorHandler(ErrorHandler eh)

Implements abstract javax.xml.parsers.DocumentBuilder.setErrorHandler.

Doc from javax.xml.parsers.DocumentBuilder.setErrorHandler.

Specify the ErrorHandler to be used by the parser. Setting this to null will result in the underlying implementation using it's own default implementation and behavior.

Parameters
eh:ErrorHandler

The ErrorHandler to be used by the parser.

setFeaturesback to summary
private void setFeatures(Map<String, Boolean> features) throws SAXNotSupportedException, SAXNotRecognizedException