public class

SchemaDOMParser

extends DefaultXMLDocumentHandler
java.lang.Object
   ↳ org.apache.xerces.impl.xs.opti.DefaultXMLDocumentHandler
     ↳ org.apache.xerces.impl.xs.opti.SchemaDOMParser

Summary

Constants
String ERROR_REPORTER Property identifier: error reporter.
String GENERATE_SYNTHETIC_ANNOTATION Feature identifier: generate synthetic annotations.
[Expand]
Inherited Constants
From interface org.apache.xerces.xni.XMLDTDContentModelHandler
From interface org.apache.xerces.xni.XMLDTDHandler
Fields
protected XMLLocator fLocator
protected NamespaceContext fNamespaceContext
Public Constructors
SchemaDOMParser(XMLParserConfiguration config)
Default constructor.
Public Methods
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.
Document getDocument2()
Gets the document from SchemaParsingConfig
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.
[Expand]
Inherited Methods
From class org.apache.xerces.impl.xs.opti.DefaultXMLDocumentHandler
From class java.lang.Object
From interface org.apache.xerces.xni.XMLDTDContentModelHandler
From interface org.apache.xerces.xni.XMLDTDHandler
From interface org.apache.xerces.xni.XMLDocumentHandler

Constants

public static final String ERROR_REPORTER

Property identifier: error reporter.

Constant Value: "http://apache.org/xml/properties/internal/error-reporter"

public static final String GENERATE_SYNTHETIC_ANNOTATION

Feature identifier: generate synthetic annotations.

Constant Value: "http://apache.org/xml/features/generate-synthetic-annotations"

Fields

protected XMLLocator fLocator

protected NamespaceContext fNamespaceContext

Public Constructors

public SchemaDOMParser (XMLParserConfiguration config)

Default constructor.

Public Methods

public void characters (XMLString text, Augmentations augs)

Character content.

Parameters
text The content.
augs Additional information that may include infoset augmentations
Throws
XNIException Thrown by handler to signal an error.

public void comment (XMLString text, Augmentations augs)

A comment.

Parameters
text The text in the comment.
augs Additional information that may include infoset augmentations
Throws
XNIException Thrown by application to signal an error.

public void emptyElement (QName element, XMLAttributes attributes, Augmentations augs)

An empty element.

Parameters
element The name of the element.
attributes The element attributes.
augs Additional information that may include infoset augmentations
Throws
XNIException Thrown by handler to signal an error.

public void endCDATA (Augmentations augs)

The end of a CDATA section.

Parameters
augs Additional information that may include infoset augmentations
Throws
XNIException Thrown by handler to signal an error.

public void endDocument (Augmentations augs)

The end of the document.

Parameters
augs Additional information that may include infoset augmentations
Throws
XNIException Thrown by handler to signal an error.

public void endElement (QName element, Augmentations augs)

The end of an element.

Parameters
element The name of the element.
augs Additional information that may include infoset augmentations
Throws
XNIException Thrown by handler to signal an error.

public Document getDocument ()

Returns the DOM document object.

public Document getDocument2 ()

Gets the document from SchemaParsingConfig

Returns
  • Document

public boolean getFeature (String featureId)

Delegates to SchemaParsingConfig.getFeature

Returns
  • boolean

public Object getProperty (String propertyId)

Delegates to SchemaParsingConfig.getProperty.

Returns
  • Object

public void ignorableWhitespace (XMLString text, Augmentations augs)

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.

Parameters
text The ignorable whitespace.
augs Additional information that may include infoset augmentations
Throws
XNIException Thrown by handler to signal an error.

public void parse (XMLInputSource inputSource)

Delegates parsing to SchemaParsingConfig

Throws
IOException

public void processingInstruction (String target, XMLString data, Augmentations augs)

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.

Parameters
target The target.
data The data or null if none specified.
augs Additional information that may include infoset augmentations
Throws
XNIException Thrown by handler to signal an error.

public void reset ()

Reset SchemaParsingConfig

public void resetNodePool ()

ResetNodePool on SchemaParsingConfig

public void setEntityResolver (XMLEntityResolver er)

Delegates to SchemaParsingConfig.setEntityResolver.

Parameters
er XMLEntityResolver

public void setFeature (String featureId, boolean state)

Delegates to SchemaParsingConfig.setFeature

public void setProperty (String propertyId, Object value)

Delegates to SchemaParsingConfig.setProperty.

public void startCDATA (Augmentations augs)

The start of a CDATA section.

Parameters
augs Additional information that may include infoset augmentations
Throws
XNIException Thrown by handler to signal an error.

public void startDocument (XMLLocator locator, String encoding, NamespaceContext namespaceContext, Augmentations augs)

The start of the document.

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
XNIException

public void startElement (QName element, XMLAttributes attributes, Augmentations augs)

The start of an element.

Parameters
element The name of the element.
attributes The element attributes.
augs Additional information that may include infoset augmentations
Throws
XNIException Thrown by handler to signal an error.