|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--org.apache.xerces.parsers.XMLParser
|
+--org.apache.xerces.parsers.AbstractXMLDocumentParser
|
+--org.apache.xerces.parsers.AbstractDOMParser
|
+--org.apache.xerces.parsers.DOMBuilderImpl
This is Xerces DOM Builder class. It uses the abstract DOM parser with a document scanner, a dtd scanner, and a validator, as well as a grammar pool.
| Field Summary | |
protected static boolean |
DEBUG
|
protected static java.lang.String |
DYNAMIC_VALIDATION
Dynamic validation |
protected boolean |
fBusy
|
protected java.lang.String |
fSchemaType
|
protected static java.lang.String |
NAMESPACES
Feature identifier: namespaces. |
protected static java.lang.String |
NORMALIZE_DATA
Feature identifier: expose schema normalized value |
protected static java.lang.String |
PSVI_AUGMENT
|
protected static java.lang.String |
SYMBOL_TABLE
|
protected static java.lang.String |
VALIDATION_FEATURE
Feature id: validation. |
protected static java.lang.String |
XMLSCHEMA
XML Schema validation |
| Fields inherited from class org.apache.xerces.parsers.AbstractXMLDocumentParser |
fDocumentSource, fDTDContentModelSource, fDTDSource |
| Fields inherited from class org.apache.xerces.parsers.XMLParser |
ENTITY_RESOLVER, ERROR_HANDLER, fConfiguration |
| Fields inherited from interface org.w3c.dom.ls.DOMBuilder |
ACTION_APPEND_AS_CHILDREN, ACTION_INSERT_AFTER, ACTION_INSERT_BEFORE, ACTION_REPLACE, ACTION_REPLACE_CHILDREN |
| Fields inherited from interface org.apache.xerces.xni.XMLDTDHandler |
CONDITIONAL_IGNORE, CONDITIONAL_INCLUDE |
| Fields inherited from interface org.apache.xerces.xni.XMLDTDContentModelHandler |
OCCURS_ONE_OR_MORE, OCCURS_ZERO_OR_MORE, OCCURS_ZERO_OR_ONE, SEPARATOR_CHOICE, SEPARATOR_SEQUENCE |
| Constructor Summary | |
DOMBuilderImpl(java.lang.String configuration,
java.lang.String schemaType)
Constructs a DOM Builder using the standard parser configuration. |
|
DOMBuilderImpl(SymbolTable symbolTable)
Constructs a DOM Builder using the specified symbol table. |
|
DOMBuilderImpl(SymbolTable symbolTable,
org.apache.xerces.xni.grammars.XMLGrammarPool grammarPool)
Constructs a DOM Builder using the specified symbol table and grammar pool. |
|
DOMBuilderImpl(org.apache.xerces.xni.parser.XMLParserConfiguration config)
Constructs a DOM Builder using the specified parser configuration. |
|
| Method Summary | |
boolean |
canSetParameter(java.lang.String name,
java.lang.Object value)
Check if setting a parameter to a specific value is supported. |
boolean |
getAsync()
True if the DOMBuider is asynchronous, false if it is
synchronous. |
boolean |
getBusy()
True if the DOMBuider is currently busy loading a
document, otherwise false. |
org.apache.xerces.dom3.DOMConfiguration |
getConfig()
The configuration used when a document is loaded. |
org.w3c.dom.ls.DOMBuilderFilter |
getFilter()
When the application provides a filter, the parser will call out to the filter at the completion of the construction of each Element node. |
java.lang.Object |
getParameter(java.lang.String name)
Look up the value of a feature or a property. |
org.w3c.dom.Document |
parse(org.w3c.dom.ls.DOMInputSource is)
Parse an XML document from a resource identified by an DOMInputSource. |
org.w3c.dom.Document |
parseURI(java.lang.String uri)
Parse an XML document from a location identified by an URI reference. |
org.w3c.dom.Node |
parseWithContext(org.w3c.dom.ls.DOMInputSource is,
org.w3c.dom.Node cnode,
short action)
Parse an XML document or fragment from a resource identified by an DOMInputSource and insert the content into an existing
document at the position epcified with the contextNode
and action arguments. |
void |
reset()
Resets the parser state. |
void |
setFilter(org.w3c.dom.ls.DOMBuilderFilter filter)
When the application provides a filter, the parser will call out to the filter at the completion of the construction of each Element node. |
void |
setParameter(java.lang.String name,
java.lang.Object value)
Set parameters and properties |
| Methods inherited from class org.apache.xerces.parsers.AbstractXMLDocumentParser |
any, element, empty, endContentModel, endGroup, getDocumentSource, getDTDContentModelSource, getDTDSource, occurrence, pcdata, separator, setDocumentSource, setDTDContentModelSource, setDTDSource, startContentModel, startGroup |
| Methods inherited from class org.apache.xerces.parsers.XMLParser |
parse |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.w3c.dom.ls.DOMBuilder |
abort |
| Field Detail |
protected static final java.lang.String NAMESPACES
protected static final java.lang.String VALIDATION_FEATURE
protected static final java.lang.String XMLSCHEMA
protected static final java.lang.String DYNAMIC_VALIDATION
protected static final java.lang.String NORMALIZE_DATA
protected static final java.lang.String SYMBOL_TABLE
protected static final java.lang.String PSVI_AUGMENT
protected java.lang.String fSchemaType
protected boolean fBusy
protected static final boolean DEBUG
| Constructor Detail |
public DOMBuilderImpl(java.lang.String configuration,
java.lang.String schemaType)
public DOMBuilderImpl(org.apache.xerces.xni.parser.XMLParserConfiguration config)
public DOMBuilderImpl(SymbolTable symbolTable)
public DOMBuilderImpl(SymbolTable symbolTable,
org.apache.xerces.xni.grammars.XMLGrammarPool grammarPool)
| Method Detail |
public void reset()
reset in class AbstractDOMParserSAXException - Thrown on initialization error.public org.apache.xerces.dom3.DOMConfiguration getConfig()
org.w3c.dom.ls.DOMBuilderDOMConfiguration object used by the
Document nodes. The DOM application is responsible for
passing the parameters values from the DOMConfiguration
object referenced from the DOMBuilder to the
DOMConfiguration object referenced from the
Document node.
DOMConfiguration objects for
DOMBuider adds the following boolean parameters:
"entity-resolver"DOMEntityResolver object. If this parameter has been
specified, each time a reference to an external entity is encountered
the implementation will pass the public and system IDs to the entity
resolver, which can then specify the actual source of the entity. If
this parameter is not set, the resolution of entities in the document
is implementation dependent.
Note: When the features "LS-Load" or "LS-Save" are
supported, this parameter may also be supported by the
DOMConfiguration object referenced from the
Document node.
"certified"truefalse"charset-overrides-xml-encoding"trueDOMInputSource overrides encodings from the
protocol. false"supported-mediatypes-only"truefalse"unknown-characters"truefalsegetConfig in interface org.w3c.dom.ls.DOMBuilderpublic org.w3c.dom.ls.DOMBuilderFilter getFilter()
Element node. The filter implementation can choose to
remove the element from the document being constructed (unless the
element is the document element) or to terminate the parse early. If
the document is being validated when it's loaded the validation
happens before the filter is called.getFilter in interface org.w3c.dom.ls.DOMBuilderpublic void setFilter(org.w3c.dom.ls.DOMBuilderFilter filter)
Element node. The filter implementation can choose to
remove the element from the document being constructed (unless the
element is the document element) or to terminate the parse early. If
the document is being validated when it's loaded the validation
happens before the filter is called.setFilter in interface org.w3c.dom.ls.DOMBuilder
public void setParameter(java.lang.String name,
java.lang.Object value)
throws org.w3c.dom.DOMException
setParameter in interface org.apache.xerces.dom3.DOMConfigurationorg.apache.xerces.dom3.DOMConfigurationname - The name of the parameter to set.value - The new value or null if the user wishes to
unset the parameter. While the type of the value parameter is
defined as DOMUserData, the object type must match the
type defined by the definition of the parameter. For example, if
the parameter is "error-handler", the value must be of
type DOMErrorHandler. Should we allow implementations
to raise exception if the type does not match? INVALID_ACCESS_ERR
seems the closest exception code...org.w3c.dom.DOMException - NOT_SUPPORTED_ERR: Raised when the parameter name is recognized but
the requested value cannot be set.
public java.lang.Object getParameter(java.lang.String name)
throws org.w3c.dom.DOMException
getParameter in interface org.apache.xerces.dom3.DOMConfigurationorg.apache.xerces.dom3.DOMConfigurationname - The name of the parameter.null if no object has been associated or if the
parameter is not supported. "by a DOM application" prevents a DOM
implementation to return its default behavior (such as the default
"schema-type") if any.org.w3c.dom.DOMException - NOT_FOUND_ERR: Raised when the parameter name is not recognized.
public boolean canSetParameter(java.lang.String name,
java.lang.Object value)
org.apache.xerces.dom3.DOMConfigurationcanSetParameter in interface org.apache.xerces.dom3.DOMConfigurationorg.apache.xerces.dom3.DOMConfigurationname - The name of the parameter to check.value - An object. if null, the returned value is
true.true if the parameter could be successfully set
to the specified value, or false if the parameter is
not recognized or the requested value is not supported. This does
not change the current value of the parameter itself.public org.w3c.dom.Document parseURI(java.lang.String uri)
parseURI in interface org.w3c.dom.ls.DOMBuilderorg.w3c.dom.ls.DOMBuilderuri - The location of the XML document to be read.DOMBuilder is a synchronous
DOMBuilder, the newly created and populated
Document is returned. If the DOMBuilder
is asynchronous, null is returned since the document
object may not yet be constructed when this method returns.org.w3c.dom.DOMException - INVALID_STATE_ERR: Raised if the DOMBuilder's
DOMBuilder.busy attribute is true.public org.w3c.dom.Document parse(org.w3c.dom.ls.DOMInputSource is)
DOMInputSource.parse in interface org.w3c.dom.ls.DOMBuilderorg.w3c.dom.ls.DOMBuilderis - The DOMInputSource from which the source of
the document is to be read.DOMBuilder is a synchronous
DOMBuilder, the newly created and populated
Document is returned. If the DOMBuilder
is asynchronous, null is returned since the document
object may not yet be constructed when this method returns.org.w3c.dom.DOMException - INVALID_STATE_ERR: Raised if the DOMBuilder's
DOMBuilder.busy attribute is true.
public org.w3c.dom.Node parseWithContext(org.w3c.dom.ls.DOMInputSource is,
org.w3c.dom.Node cnode,
short action)
throws org.w3c.dom.DOMException
DOMInputSource and insert the content into an existing
document at the position epcified with the contextNode
and action arguments. When parsing the input stream the
context node is used for resolving unbound namespace prefixes.parseWithContext in interface org.w3c.dom.ls.DOMBuilderis - The DOMInputSource from which the source
document is to be read.cnode - The Node that is used as the context for
the data that is being parsed.action - This parameter describes which action should be taken
between the new set of node being inserted and the existing
children of the context node. The set of possible actions is
defined above.org.w3c.dom.DOMException - HIERARCHY_REQUEST_ERR: Thrown if this action results in an invalid
hierarchy (i.e. a Document with more than one document element).public boolean getAsync()
org.w3c.dom.ls.DOMBuilderDOMBuider is asynchronous, false if it is
synchronous.getAsync in interface org.w3c.dom.ls.DOMBuilderDOMBuilder.getAsync()public boolean getBusy()
org.w3c.dom.ls.DOMBuilderDOMBuider is currently busy loading a
document, otherwise false.getBusy in interface org.w3c.dom.ls.DOMBuilderDOMBuilder.getBusy()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||