public class SchemaDOMParser extends DefaultXMLDocumentHandler
Modifier and Type | Field and Description |
---|---|
static String |
ERROR_REPORTER
Property identifier: error reporter.
|
protected XMLLocator |
fLocator |
protected NamespaceContext |
fNamespaceContext |
static String |
GENERATE_SYNTHETIC_ANNOTATION
Feature identifier: generate synthetic annotations.
|
CONDITIONAL_IGNORE, CONDITIONAL_INCLUDE
OCCURS_ONE_OR_MORE, OCCURS_ZERO_OR_MORE, OCCURS_ZERO_OR_ONE, SEPARATOR_CHOICE, SEPARATOR_SEQUENCE
Constructor and Description |
---|
SchemaDOMParser(XMLParserConfiguration config)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
characters(XMLString text,
Augmentations augs)
Character content.
|
void |
comment(XMLString text,
Augmentations augs)
A comment.
|
void |
emptyElement(QName element,
XMLAttributes attributes,
Augmentations augs)
An empty element.
|
void |
endCDATA(Augmentations augs)
The end of a CDATA section.
|
void |
endDocument(Augmentations augs)
The end of the document.
|
void |
endElement(QName element,
Augmentations augs)
The end of an element.
|
Document |
getDocument()
Returns the DOM document object.
|
boolean |
getFeature(String featureId)
Delegates to SchemaParsingConfig.getFeature
|
Object |
getProperty(String propertyId)
Delegates to SchemaParsingConfig.getProperty.
|
void |
ignorableWhitespace(XMLString text,
Augmentations augs)
Ignorable whitespace.
|
void |
parse(XMLInputSource inputSource)
Delegates parsing to SchemaParsingConfig
|
void |
processingInstruction(String target,
XMLString data,
Augmentations augs)
A processing instruction.
|
void |
reset()
Reset SchemaParsingConfig
|
void |
resetNodePool()
ResetNodePool on SchemaParsingConfig
|
void |
setEntityResolver(XMLEntityResolver er)
Delegates to SchemaParsingConfig.setEntityResolver.
|
void |
setFeature(String featureId,
boolean state)
Delegates to SchemaParsingConfig.setFeature
|
void |
setProperty(String propertyId,
Object value)
Delegates to SchemaParsingConfig.setProperty.
|
void |
startCDATA(Augmentations augs)
The start of a CDATA section.
|
void |
startDocument(XMLLocator locator,
String encoding,
NamespaceContext namespaceContext,
Augmentations augs)
The start of the document.
|
void |
startElement(QName element,
XMLAttributes attributes,
Augmentations augs)
The start of an element.
|
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
public static final String ERROR_REPORTER
public static final String GENERATE_SYNTHETIC_ANNOTATION
protected XMLLocator fLocator
protected NamespaceContext fNamespaceContext
public SchemaDOMParser(XMLParserConfiguration config)
public void startDocument(XMLLocator locator, String encoding, NamespaceContext namespaceContext, Augmentations augs) throws XNIException
DefaultXMLDocumentHandler
startDocument
in interface XMLDocumentHandler
startDocument
in class DefaultXMLDocumentHandler
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 augmentationsXNIException
- Thrown by handler to signal an error.public void endDocument(Augmentations augs) throws XNIException
endDocument
in interface XMLDocumentHandler
endDocument
in class DefaultXMLDocumentHandler
augs
- Additional information that may include infoset augmentationsXNIException
- Thrown by handler to signal an error.public void comment(XMLString text, Augmentations augs) throws XNIException
comment
in interface XMLDocumentHandler
comment
in interface XMLDTDHandler
comment
in class DefaultXMLDocumentHandler
text
- The text in the comment.augs
- Additional information that may include infoset augmentationsXNIException
- Thrown by application to signal an error.public void processingInstruction(String target, XMLString data, Augmentations augs) throws XNIException
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.
processingInstruction
in interface XMLDocumentHandler
processingInstruction
in interface XMLDTDHandler
processingInstruction
in class DefaultXMLDocumentHandler
target
- The target.data
- The data or null if none specified.augs
- Additional information that may include infoset augmentationsXNIException
- Thrown by handler to signal an error.public void characters(XMLString text, Augmentations augs) throws XNIException
characters
in interface XMLDocumentHandler
characters
in class DefaultXMLDocumentHandler
text
- The content.augs
- Additional information that may include infoset augmentationsXNIException
- Thrown by handler to signal an error.public void startElement(QName element, XMLAttributes attributes, Augmentations augs) throws XNIException
startElement
in interface XMLDocumentHandler
startElement
in class DefaultXMLDocumentHandler
element
- The name of the element.attributes
- The element attributes.augs
- Additional information that may include infoset augmentationsXNIException
- Thrown by handler to signal an error.public void emptyElement(QName element, XMLAttributes attributes, Augmentations augs) throws XNIException
emptyElement
in interface XMLDocumentHandler
emptyElement
in class DefaultXMLDocumentHandler
element
- The name of the element.attributes
- The element attributes.augs
- Additional information that may include infoset augmentationsXNIException
- Thrown by handler to signal an error.public void endElement(QName element, Augmentations augs) throws XNIException
endElement
in interface XMLDocumentHandler
endElement
in class DefaultXMLDocumentHandler
element
- The name of the element.augs
- Additional information that may include infoset augmentationsXNIException
- Thrown by handler to signal an error.public void ignorableWhitespace(XMLString text, Augmentations augs) throws XNIException
ignorableWhitespace
in interface XMLDocumentHandler
ignorableWhitespace
in class DefaultXMLDocumentHandler
text
- The ignorable whitespace.augs
- Additional information that may include infoset augmentationsXNIException
- Thrown by handler to signal an error.public void startCDATA(Augmentations augs) throws XNIException
startCDATA
in interface XMLDocumentHandler
startCDATA
in class DefaultXMLDocumentHandler
augs
- Additional information that may include infoset augmentationsXNIException
- Thrown by handler to signal an error.public void endCDATA(Augmentations augs) throws XNIException
endCDATA
in interface XMLDocumentHandler
endCDATA
in class DefaultXMLDocumentHandler
augs
- Additional information that may include infoset augmentationsXNIException
- Thrown by handler to signal an error.public Document getDocument()
public void setFeature(String featureId, boolean state)
featureId
- state
- public boolean getFeature(String featureId)
featureId
- public void setProperty(String propertyId, Object value)
propertyId
- value
- public Object getProperty(String propertyId)
propertyId
- public void setEntityResolver(XMLEntityResolver er)
er
- XMLEntityResolverpublic void parse(XMLInputSource inputSource) throws IOException
inputSource
- IOException
public void reset()
public void resetNodePool()
Copyright © 2021 JBoss by Red Hat. All rights reserved.