Package org.apache.xerces.impl.xs.opti
Class SchemaDOMParser
java.lang.Object
org.apache.xerces.impl.xs.opti.DefaultXMLDocumentHandler
org.apache.xerces.impl.xs.opti.SchemaDOMParser
- All Implemented Interfaces:
org.apache.xerces.xni.XMLDocumentHandler,org.apache.xerces.xni.XMLDTDContentModelHandler,org.apache.xerces.xni.XMLDTDHandler
INTERNAL:
- Usage of this class is not supported. It may be altered or removed at any time.
- Version:
- $Id: SchemaDOMParser.java 963267 2010-07-12 12:48:37Z mrglavas $
- Author:
- Rahul Srivastava, Sun Microsystems Inc., Sandy Gao, IBM
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringProperty identifier: error reporter.protected org.apache.xerces.xni.XMLLocatorprotected org.apache.xerces.xni.NamespaceContextstatic final StringFeature identifier: generate synthetic annotations.Fields inherited from interface org.apache.xerces.xni.XMLDTDContentModelHandler
OCCURS_ONE_OR_MORE, OCCURS_ZERO_OR_MORE, OCCURS_ZERO_OR_ONE, SEPARATOR_CHOICE, SEPARATOR_SEQUENCEFields inherited from interface org.apache.xerces.xni.XMLDTDHandler
CONDITIONAL_IGNORE, CONDITIONAL_INCLUDE -
Constructor Summary
ConstructorsConstructorDescriptionSchemaDOMParser(org.apache.xerces.xni.parser.XMLParserConfiguration config) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidcharacters(org.apache.xerces.xni.XMLString text, org.apache.xerces.xni.Augmentations augs) Character content.voidcomment(org.apache.xerces.xni.XMLString text, org.apache.xerces.xni.Augmentations augs) A comment.voidemptyElement(org.apache.xerces.xni.QName element, org.apache.xerces.xni.XMLAttributes attributes, org.apache.xerces.xni.Augmentations augs) An empty element.voidendCDATA(org.apache.xerces.xni.Augmentations augs) The end of a CDATA section.voidendDocument(org.apache.xerces.xni.Augmentations augs) The end of the document.voidendElement(org.apache.xerces.xni.QName element, org.apache.xerces.xni.Augmentations augs) The end of an element.Returns the DOM document object.booleangetFeature(String featureId) Delegates to SchemaParsingConfig.getFeaturegetProperty(String propertyId) Delegates to SchemaParsingConfig.getProperty.voidignorableWhitespace(org.apache.xerces.xni.XMLString text, org.apache.xerces.xni.Augmentations augs) Ignorable whitespace.voidparse(org.apache.xerces.xni.parser.XMLInputSource inputSource) Delegates parsing to SchemaParsingConfigvoidprocessingInstruction(String target, org.apache.xerces.xni.XMLString data, org.apache.xerces.xni.Augmentations augs) A processing instruction.voidreset()Reset SchemaParsingConfigvoidResetNodePool on SchemaParsingConfigvoidsetEntityResolver(org.apache.xerces.xni.parser.XMLEntityResolver er) Delegates to SchemaParsingConfig.setEntityResolver.voidsetFeature(String featureId, boolean state) Delegates to SchemaParsingConfig.setFeaturevoidsetProperty(String propertyId, Object value) Delegates to SchemaParsingConfig.setProperty.voidstartCDATA(org.apache.xerces.xni.Augmentations augs) The start of a CDATA section.voidstartDocument(org.apache.xerces.xni.XMLLocator locator, String encoding, org.apache.xerces.xni.NamespaceContext namespaceContext, org.apache.xerces.xni.Augmentations augs) The start of the document.voidstartElement(org.apache.xerces.xni.QName element, org.apache.xerces.xni.XMLAttributes attributes, org.apache.xerces.xni.Augmentations augs) The start of an element.Methods inherited from class org.apache.xerces.impl.xs.opti.DefaultXMLDocumentHandler
any, attributeDecl, doctypeDecl, element, elementDecl, empty, endAttlist, endConditional, endContentModel, endDTD, endExternalSubset, endGeneralEntity, endGroup, endParameterEntity, endPrefixMapping, externalEntityDecl, getDocumentSource, getDTDContentModelSource, getDTDSource, ignoredCharacters, internalEntityDecl, notationDecl, occurrence, pcdata, separator, setDocumentSource, setDTDContentModelSource, setDTDSource, startAttlist, startConditional, startContentModel, startDTD, startExternalSubset, startGeneralEntity, startGroup, startParameterEntity, startPrefixMapping, textDecl, unparsedEntityDecl, xmlDecl
-
Field Details
-
ERROR_REPORTER
Property identifier: error reporter.- See Also:
-
GENERATE_SYNTHETIC_ANNOTATION
Feature identifier: generate synthetic annotations.- See Also:
-
fLocator
protected org.apache.xerces.xni.XMLLocator fLocator -
fNamespaceContext
protected org.apache.xerces.xni.NamespaceContext fNamespaceContext
-
-
Constructor Details
-
SchemaDOMParser
public SchemaDOMParser(org.apache.xerces.xni.parser.XMLParserConfiguration config) Default constructor.
-
-
Method Details
-
startDocument
public void startDocument(org.apache.xerces.xni.XMLLocator locator, String encoding, org.apache.xerces.xni.NamespaceContext namespaceContext, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException Description copied from class:DefaultXMLDocumentHandlerThe start of the document.- Specified by:
startDocumentin interfaceorg.apache.xerces.xni.XMLDocumentHandler- Overrides:
startDocumentin classDefaultXMLDocumentHandler- Parameters:
locator- The document locator, or null if the document location cannot be reported during the parsing of this document. However, it is strongly recommended that a locator be supplied that can at least report the system identifier of the document.encoding- The auto-detected IANA encoding name of the entity stream. This value will be null in those situations where the entity encoding is not auto-detected (e.g. internal entities or a document entity that is parsed from a java.io.Reader).namespaceContext- The namespace context in effect at the start of this document. This object represents the current context. Implementors of this class are responsible for copying the namespace bindings from the the current context (and its parent contexts) if that information is important.augs- Additional information that may include infoset augmentations- Throws:
org.apache.xerces.xni.XNIException- Thrown by handler to signal an error.
-
endDocument
public void endDocument(org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException The end of the document.- Specified by:
endDocumentin interfaceorg.apache.xerces.xni.XMLDocumentHandler- Overrides:
endDocumentin classDefaultXMLDocumentHandler- Parameters:
augs- Additional information that may include infoset augmentations- Throws:
org.apache.xerces.xni.XNIException- Thrown by handler to signal an error.
-
comment
public void comment(org.apache.xerces.xni.XMLString text, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException A comment.- Specified by:
commentin interfaceorg.apache.xerces.xni.XMLDocumentHandler- Specified by:
commentin interfaceorg.apache.xerces.xni.XMLDTDHandler- Overrides:
commentin classDefaultXMLDocumentHandler- Parameters:
text- The text in the comment.augs- Additional information that may include infoset augmentations- Throws:
org.apache.xerces.xni.XNIException- Thrown by application to signal an error.
-
processingInstruction
public void processingInstruction(String target, org.apache.xerces.xni.XMLString data, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException A processing instruction. Processing instructions consist of a target name and, optionally, text data. The data is only meaningful to the application.Typically, a processing instruction's data will contain a series of pseudo-attributes. These pseudo-attributes follow the form of element attributes but are not parsed or presented to the application as anything other than text. The application is responsible for parsing the data.
- Specified by:
processingInstructionin interfaceorg.apache.xerces.xni.XMLDocumentHandler- Specified by:
processingInstructionin interfaceorg.apache.xerces.xni.XMLDTDHandler- Overrides:
processingInstructionin classDefaultXMLDocumentHandler- Parameters:
target- The target.data- The data or null if none specified.augs- Additional information that may include infoset augmentations- Throws:
org.apache.xerces.xni.XNIException- Thrown by handler to signal an error.
-
characters
public void characters(org.apache.xerces.xni.XMLString text, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException Character content.- Specified by:
charactersin interfaceorg.apache.xerces.xni.XMLDocumentHandler- Overrides:
charactersin classDefaultXMLDocumentHandler- Parameters:
text- The content.augs- Additional information that may include infoset augmentations- Throws:
org.apache.xerces.xni.XNIException- Thrown by handler to signal an error.
-
startElement
public void startElement(org.apache.xerces.xni.QName element, org.apache.xerces.xni.XMLAttributes attributes, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException The start of an element.- Specified by:
startElementin interfaceorg.apache.xerces.xni.XMLDocumentHandler- Overrides:
startElementin classDefaultXMLDocumentHandler- Parameters:
element- The name of the element.attributes- The element attributes.augs- Additional information that may include infoset augmentations- Throws:
org.apache.xerces.xni.XNIException- Thrown by handler to signal an error.
-
emptyElement
public void emptyElement(org.apache.xerces.xni.QName element, org.apache.xerces.xni.XMLAttributes attributes, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException An empty element.- Specified by:
emptyElementin interfaceorg.apache.xerces.xni.XMLDocumentHandler- Overrides:
emptyElementin classDefaultXMLDocumentHandler- Parameters:
element- The name of the element.attributes- The element attributes.augs- Additional information that may include infoset augmentations- Throws:
org.apache.xerces.xni.XNIException- Thrown by handler to signal an error.
-
endElement
public void endElement(org.apache.xerces.xni.QName element, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException The end of an element.- Specified by:
endElementin interfaceorg.apache.xerces.xni.XMLDocumentHandler- Overrides:
endElementin classDefaultXMLDocumentHandler- Parameters:
element- The name of the element.augs- Additional information that may include infoset augmentations- Throws:
org.apache.xerces.xni.XNIException- Thrown by handler to signal an error.
-
ignorableWhitespace
public void ignorableWhitespace(org.apache.xerces.xni.XMLString text, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException Ignorable whitespace. For this method to be called, the document source must have some way of determining that the text containing only whitespace characters should be considered ignorable. For example, the validator can determine if a length of whitespace characters in the document are ignorable based on the element content model.- Specified by:
ignorableWhitespacein interfaceorg.apache.xerces.xni.XMLDocumentHandler- Overrides:
ignorableWhitespacein classDefaultXMLDocumentHandler- Parameters:
text- The ignorable whitespace.augs- Additional information that may include infoset augmentations- Throws:
org.apache.xerces.xni.XNIException- Thrown by handler to signal an error.
-
startCDATA
public void startCDATA(org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException The start of a CDATA section.- Specified by:
startCDATAin interfaceorg.apache.xerces.xni.XMLDocumentHandler- Overrides:
startCDATAin classDefaultXMLDocumentHandler- Parameters:
augs- Additional information that may include infoset augmentations- Throws:
org.apache.xerces.xni.XNIException- Thrown by handler to signal an error.
-
endCDATA
public void endCDATA(org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException The end of a CDATA section.- Specified by:
endCDATAin interfaceorg.apache.xerces.xni.XMLDocumentHandler- Overrides:
endCDATAin classDefaultXMLDocumentHandler- Parameters:
augs- Additional information that may include infoset augmentations- Throws:
org.apache.xerces.xni.XNIException- Thrown by handler to signal an error.
-
getDocument
Returns the DOM document object. -
setFeature
Delegates to SchemaParsingConfig.setFeature- Parameters:
featureId-state-
-
getFeature
Delegates to SchemaParsingConfig.getFeature- Parameters:
featureId-- Returns:
- boolean
-
setProperty
Delegates to SchemaParsingConfig.setProperty.- Parameters:
propertyId-value-
-
getProperty
Delegates to SchemaParsingConfig.getProperty.- Parameters:
propertyId-- Returns:
- Object
-
setEntityResolver
public void setEntityResolver(org.apache.xerces.xni.parser.XMLEntityResolver er) Delegates to SchemaParsingConfig.setEntityResolver.- Parameters:
er- XMLEntityResolver
-
parse
Delegates parsing to SchemaParsingConfig- Parameters:
inputSource-- Throws:
IOException
-
reset
public void reset()Reset SchemaParsingConfig -
resetNodePool
public void resetNodePool()ResetNodePool on SchemaParsingConfig
-