|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.xerces.parsers.XMLParser
org.apache.xerces.parsers.AbstractXMLDocumentParser
org.apache.xerces.parsers.AbstractDOMParser
org.apache.xerces.parsers.DOMParserImpl
public class DOMParserImpl
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 String |
DISALLOW_DOCTYPE_DECL_FEATURE
Feature identifier: disallow docType Decls. |
protected static String |
DYNAMIC_VALIDATION
Dynamic validation |
protected boolean |
fBusy
|
protected boolean |
fNamespaceDeclarations
Include namespace declaration attributes in the document. |
protected String |
fSchemaType
|
protected static String |
HONOUR_ALL_SCHEMALOCATIONS
Feature identifier: honour all schemaLocations |
protected static String |
NAMESPACE_GROWTH
Feature identifier: namespace growth |
protected static String |
NAMESPACES
Feature identifier: namespaces. |
protected static String |
NORMALIZE_DATA
Feature identifier: expose schema normalized value |
protected static String |
PSVI_AUGMENT
|
protected static String |
SYMBOL_TABLE
|
protected static String |
TOLERATE_DUPLICATES
Feature identifier: tolerate duplicates |
protected static String |
VALIDATION_FEATURE
Feature id: validation. |
protected static String |
XMLSCHEMA
XML Schema validation |
protected static String |
XMLSCHEMA_FULL_CHECKING
XML Schema full checking |
| 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.LSParser |
|---|
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 | |
|---|---|
DOMParserImpl(String configuration,
String schemaType)
Constructs a DOM Builder using the standard parser configuration. |
|
DOMParserImpl(SymbolTable symbolTable)
Constructs a DOM Builder using the specified symbol table. |
|
DOMParserImpl(SymbolTable symbolTable,
XMLGrammarPool grammarPool)
Constructs a DOM Builder using the specified symbol table and grammar pool. |
|
DOMParserImpl(XMLParserConfiguration config)
Constructs a DOM Builder using the specified parser configuration. |
|
| Method Summary | |
|---|---|
void |
abort()
|
boolean |
canSetParameter(String name,
Object value)
|
boolean |
getAsync()
|
boolean |
getBusy()
|
DOMConfiguration |
getDomConfig()
|
LSParserFilter |
getFilter()
When a filter is provided, the implementation will call out to the filter as it is constructing the DOM tree structure. |
Object |
getParameter(String name)
Look up the value of a feature or a property. |
DOMStringList |
getParameterNames()
DOM Level 3 CR - Experimental. |
Document |
parse(LSInput is)
Parse an XML document from a resource identified by an LSInput. |
Document |
parseURI(String uri)
Parse an XML document from a location identified by an URI reference. |
Node |
parseWithContext(LSInput is,
Node cnode,
short action)
Parse an XML document or fragment from a resource identified by an LSInput 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(LSParserFilter filter)
When a filter is provided, the implementation will call out to the filter as it is constructing the DOM tree structure. |
void |
setParameter(String name,
Object value)
Set parameters and properties |
void |
startElement(QName element,
XMLAttributes attributes,
Augmentations augs)
The start of an element. |
| 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 |
| Field Detail |
|---|
protected static final String NAMESPACES
protected static final String VALIDATION_FEATURE
protected static final String XMLSCHEMA
protected static final String XMLSCHEMA_FULL_CHECKING
protected static final String DYNAMIC_VALIDATION
protected static final String NORMALIZE_DATA
protected static final String DISALLOW_DOCTYPE_DECL_FEATURE
protected static final String HONOUR_ALL_SCHEMALOCATIONS
protected static final String NAMESPACE_GROWTH
protected static final String TOLERATE_DUPLICATES
protected static final String SYMBOL_TABLE
protected static final String PSVI_AUGMENT
protected boolean fNamespaceDeclarations
protected String fSchemaType
protected boolean fBusy
protected static final boolean DEBUG
| Constructor Detail |
|---|
public DOMParserImpl(String configuration,
String schemaType)
public DOMParserImpl(XMLParserConfiguration config)
public DOMParserImpl(SymbolTable symbolTable)
public DOMParserImpl(SymbolTable symbolTable,
XMLGrammarPool grammarPool)
| Method Detail |
|---|
public void reset()
reset in class AbstractDOMParserSAXException - Thrown on initialization error.public DOMConfiguration getDomConfig()
getDomConfig in interface LSParserpublic LSParserFilter getFilter()
DOMConfiguration parameters have been applied. For
example, if "
validate" is set to true, the validation is done before invoking the
filter.
getFilter in interface LSParserpublic void setFilter(LSParserFilter filter)
DOMConfiguration parameters have been applied. For
example, if "
validate" is set to true, the validation is done before invoking the
filter.
setFilter in interface LSParser
public void setParameter(String name,
Object value)
throws DOMException
setParameter in interface DOMConfigurationDOMException
public Object getParameter(String name)
throws DOMException
getParameter in interface DOMConfigurationDOMException
public boolean canSetParameter(String name,
Object value)
canSetParameter in interface DOMConfigurationpublic DOMStringList getParameterNames()
DOMConfiguration object and for which at least one value
can be set by the application. Note that this list can also contain
parameter names defined outside this specification.
getParameterNames in interface DOMConfiguration
public Document parseURI(String uri)
throws LSException
parseURI in interface LSParserLSException
public Document parse(LSInput is)
throws LSException
LSInput.
parse in interface LSParserLSException
public Node parseWithContext(LSInput is,
Node cnode,
short action)
throws DOMException,
LSException
LSInput 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 LSParseris - The LSInput 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.
DOMException - HIERARCHY_REQUEST_ERR: Thrown if this action results in an invalid
hierarchy (i.e. a Document with more than one document element).
LSExceptionpublic boolean getAsync()
getAsync in interface LSParserLSParser.getAsync()public boolean getBusy()
getBusy in interface LSParserLSParser.getBusy()public void abort()
abort in interface LSParserabort in class AbstractDOMParserLSParser.abort()
public void startElement(QName element,
XMLAttributes attributes,
Augmentations augs)
startElement in interface XMLDocumentHandlerstartElement in class AbstractDOMParserelement - The name of the element.attributes - The element attributes.augs - Additional information that may include infoset augmentations
XNIException - Thrown by handler to signal an error.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||