Top Description Fields Constructors Methods
org.apache.xerces.parsers

public abstract Class AbstractXMLDocumentParser

extends XMLParser
implements XMLDocumentHandler, XMLDTDHandler, XMLDTDContentModelHandler
Class Inheritance
All Implemented Interfaces
org.apache.xerces.xni.XMLDTDContentModelHandler, org.apache.xerces.xni.XMLDTDHandler, org.apache.xerces.xni.XMLDocumentHandler
Known Direct Subclasses
org.apache.xerces.parsers.XMLDocumentParser, org.apache.xerces.parsers.AbstractDOMParser, org.apache.xerces.parsers.AbstractSAXParser
Imports
org.apache.xerces.xni.Augmentations, .NamespaceContext, .QName, .XMLAttributes, .XMLDTDContentModelHandler, .XMLDTDHandler, .XMLDocumentHandler, .XMLLocator, .XMLResourceIdentifier, .XMLString, .XNIException, org.apache.xerces.xni.parser.XMLDTDContentModelSource, .XMLDTDSource, .XMLDocumentSource, .XMLParserConfiguration

This is the base class for all XML document parsers. XMLDocumentParser provides a common implementation shared by the various document parsers in the Xerces package. While this class is provided for convenience, it does not prevent other kinds of parsers to be constructed using the XNI interfaces.
Authors
Arnaud Le Hors, IBM, Andy Clark, IBM
Version
$Id: AbstractXMLDocumentParser.java 447239 2006-09-18 05:08:26Z mrglavas $

Field Summary

Modifier and TypeField and Description
protected XMLDocumentSource
fDocumentSource

Document source

protected XMLDTDContentModelSource
fDTDContentModelSource

DTD content model source

protected XMLDTDSource
fDTDSource

DTD source

protected boolean
fInDTD

True if inside DTD.

Inherited from org.apache.xerces.parsers.XMLParser:
ENTITY_RESOLVERERROR_HANDLERfConfiguration

Constructor Summary

AccessConstructor and Description
protected
AbstractXMLDocumentParser(XMLParserConfiguration config)

Constructs a document parser using the default symbol table and grammar pool.

Method Summary

Modifier and TypeMethod and Description
public void
any(Augmentations
Additional information that may include infoset augmentations.
augs
)

Implements org.apache.xerces.xni.XMLDTDContentModelHandler.any.

A content model of ANY.
public void
attributeDecl(String
The name of the element that this attribute is associated with.
elementName
,
String
The name of the attribute.
attributeName
,
String
The attribute type. This value will be one of the following: "CDATA", "ENTITY", "ENTITIES", "ENUMERATION", "ID", "IDREF", "IDREFS", "NMTOKEN", "NMTOKENS", or "NOTATION".
type
,
String[]
If the type has the value "ENUMERATION" or "NOTATION", this array holds the allowed attribute values; otherwise, this array is null.
enumeration
,
String
The attribute default type. This value will be one of the following: "#FIXED", "#IMPLIED", "#REQUIRED", or null.
defaultType
,
XMLString
The attribute default value, or null if no default value is specified.
defaultValue
,
XMLString
The attribute default value with no normalization performed, or null if no default value is specified.
nonNormalizedDefaultValue
,
Augmentations
Additional information that may include infoset augmentations.
augs
)

Implements org.apache.xerces.xni.XMLDTDHandler.attributeDecl.

An attribute declaration.
public void
characters(XMLString
The content.
text
,
Augmentations
Additional information that may include infoset augmentations
augs
)

Implements org.apache.xerces.xni.XMLDocumentHandler.characters.

Character content.
public void
comment(XMLString
The text in the comment.
text
,
Augmentations
Additional information that may include infoset augmentations
augs
)

Implements org.apache.xerces.xni.XMLDocumentHandler.comment, org.apache.xerces.xni.XMLDTDHandler.comment.

A comment.
public void
doctypeDecl(String
The name of the root element.
rootElement
,
String
The public identifier if an external DTD or null if the external DTD is specified using SYSTEM.
publicId
,
String
The system identifier if an external DTD, null
systemId
,
Augmentations
Additional information that may include infoset augmentations otherwise.
augs
)

Implements org.apache.xerces.xni.XMLDocumentHandler.doctypeDecl.

Notifies of the presence of the DOCTYPE line in the document.
public void
element(String
The name of the referenced element.
elementName
,
Augmentations
Additional information that may include infoset augmentations.
augs
)

Implements org.apache.xerces.xni.XMLDTDContentModelHandler.element.

A referenced element in a mixed or children content model.
public void
elementDecl(String
The name of the element.
name
,
String
The element content model.
contentModel
,
Augmentations
Additional information that may include infoset augmentations.
augs
)

Implements org.apache.xerces.xni.XMLDTDHandler.elementDecl.

An element declaration.
public void
empty(Augmentations
Additional information that may include infoset augmentations.
augs
)

Implements org.apache.xerces.xni.XMLDTDContentModelHandler.empty.

A content model of EMPTY.
public void
emptyElement(QName
The name of the element.
element
,
XMLAttributes
The element attributes.
attributes
,
Augmentations
Additional information that may include infoset augmentations
augs
)

Implements org.apache.xerces.xni.XMLDocumentHandler.emptyElement.

An empty element.
public void
endAttlist(Augmentations
Additional information that may include infoset augmentations.
augs
)

Implements org.apache.xerces.xni.XMLDTDHandler.endAttlist.

The end of an attribute list.
public void
endCDATA(Augmentations
Additional information that may include infoset augmentations
augs
)

Implements org.apache.xerces.xni.XMLDocumentHandler.endCDATA.

The end of a CDATA section.
public void
endConditional(Augmentations
Additional information that may include infoset augmentations.
augs
)

Implements org.apache.xerces.xni.XMLDTDHandler.endConditional.

The end of a conditional section.
public void
endContentModel(Augmentations
Additional information that may include infoset augmentations.
augs
)

Implements org.apache.xerces.xni.XMLDTDContentModelHandler.endContentModel.

The end of a content model.
public void
endDocument(Augmentations
Additional information that may include infoset augmentations
augs
)

Implements org.apache.xerces.xni.XMLDocumentHandler.endDocument.

The end of the document.
public void
endDTD(Augmentations
Additional information that may include infoset augmentations.
augs
)

Implements org.apache.xerces.xni.XMLDTDHandler.endDTD.

The end of the DTD.
public void
endElement(QName
The name of the element.
element
,
Augmentations
Additional information that may include infoset augmentations
augs
)

Implements org.apache.xerces.xni.XMLDocumentHandler.endElement.

The end of an element.
public void
endExternalSubset(Augmentations
Additional information that may include infoset augmentations.
augmentations
)

Implements org.apache.xerces.xni.XMLDTDHandler.endExternalSubset.

The end of the DTD external subset.
public void
endGeneralEntity(String
The name of the entity.
name
,
Augmentations
Additional information that may include infoset augmentations
augs
)

Implements org.apache.xerces.xni.XMLDocumentHandler.endGeneralEntity.

This method notifies the end of an entity.
public void
endGroup(Augmentations
Additional information that may include infoset augmentations.
augs
)

Implements org.apache.xerces.xni.XMLDTDContentModelHandler.endGroup.

The end of a group for mixed or children content models.
public void
endParameterEntity(String
The name of the entity.
name
,
Augmentations
Additional information that may include infoset augmentations
augs
)

Implements org.apache.xerces.xni.XMLDTDHandler.endParameterEntity.

This method notifies the end of an entity.
public void
externalEntityDecl(String
The name of the entity. Parameter entity names start with '%', whereas the name of a general entity is just the entity name.
name
,
XMLResourceIdentifier
An object containing all location information pertinent to this entity.
identifier
,
Augmentations
Additional information that may include infoset augmentations.
augs
)

Implements org.apache.xerces.xni.XMLDTDHandler.externalEntityDecl.

An external entity declaration.
public XMLDocumentSource
public XMLDTDContentModelSource
public XMLDTDSource
public void
ignorableWhitespace(XMLString
The ignorable whitespace.
text
,
Augmentations
Additional information that may include infoset augmentations
augs
)

Implements org.apache.xerces.xni.XMLDocumentHandler.ignorableWhitespace.

Ignorable whitespace.
public void
ignoredCharacters(XMLString
The ignored text.
text
,
Augmentations
Additional information that may include infoset augmentations.
augs
)

Implements org.apache.xerces.xni.XMLDTDHandler.ignoredCharacters.

Characters within an IGNORE conditional section.
public void
internalEntityDecl(String
The name of the entity. Parameter entity names start with '%', whereas the name of a general entity is just the entity name.
name
,
XMLString
The value of the entity.
text
,
XMLString
The non-normalized value of the entity. This value contains the same sequence of characters that was in the internal entity declaration, without any entity references expanded.
nonNormalizedText
,
Augmentations
Additional information that may include infoset augmentations.
augs
)

Implements org.apache.xerces.xni.XMLDTDHandler.internalEntityDecl.

An internal entity declaration.
public void
notationDecl(String
The name of the notation.
name
,
XMLResourceIdentifier
An object containing all location information pertinent to this notation.
identifier
,
Augmentations
Additional information that may include infoset augmentations.
augs
)

Implements org.apache.xerces.xni.XMLDTDHandler.notationDecl.

A notation declaration
public void
occurrence(short
The occurrence count for the last element or group.
occurrence
,
Augmentations
Additional information that may include infoset augmentations.
augs
)

Implements org.apache.xerces.xni.XMLDTDContentModelHandler.occurrence.

The occurrence count for a child in a children content model or for the mixed content model group.
public void
pcdata(Augmentations
Additional information that may include infoset augmentations.
augs
)

Implements org.apache.xerces.xni.XMLDTDContentModelHandler.pcdata.

The appearance of "#PCDATA" within a group signifying a mixed content model.
public void
processingInstruction(String
The target.
target
,
XMLString
The data or null if none specified.
data
,
Augmentations
Additional information that may include infoset augmentations
augs
)

Implements org.apache.xerces.xni.XMLDocumentHandler.processingInstruction, org.apache.xerces.xni.XMLDTDHandler.processingInstruction.

A processing instruction.
protected void
reset()

Overrides org.apache.xerces.parsers.XMLParser.reset.

reset all components before parsing
public void
separator(short
The type of children separator.
separator
,
Augmentations
Additional information that may include infoset augmentations.
augs
)

Implements org.apache.xerces.xni.XMLDTDContentModelHandler.separator.

The separator between choices or sequences of a mixed or children content model.
public void
public void
public void
public void
startAttlist(String
The name of the element that this attribute list is associated with.
elementName
,
Augmentations
Additional information that may include infoset augmentations.
augs
)

Implements org.apache.xerces.xni.XMLDTDHandler.startAttlist.

The start of an attribute list.
public void
startCDATA(Augmentations
Additional information that may include infoset augmentations
augs
)

Implements org.apache.xerces.xni.XMLDocumentHandler.startCDATA.

The start of a CDATA section.
public void
startConditional(short
The type of the conditional section. This value will either be CONDITIONAL_INCLUDE or CONDITIONAL_IGNORE.
type
,
Augmentations
Additional information that may include infoset augmentations.
augs
)

Implements org.apache.xerces.xni.XMLDTDHandler.startConditional.

The start of a conditional section.
public void
startContentModel(String
The name of the element.
elementName
,
Augmentations
Additional information that may include infoset augmentations.
augs
)

Implements org.apache.xerces.xni.XMLDTDContentModelHandler.startContentModel.

The start of a content model.
public void
startDocument(XMLLocator
The system identifier of the entity if the entity is external, null otherwise.
locator
,
String
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).
encoding
,
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.
namespaceContext
,
Augmentations
Additional information that may include infoset augmentations
augs
)

Implements org.apache.xerces.xni.XMLDocumentHandler.startDocument.

The start of the document.
public void
startDTD(XMLLocator
The document locator, or null if the document location cannot be reported during the parsing of the document DTD. However, it is strongly recommended that a locator be supplied that can at least report the base system identifier of the DTD.
locator
,
Augmentations
Additional information that may include infoset augmentations.
augs
)

Implements org.apache.xerces.xni.XMLDTDHandler.startDTD.

The start of the DTD.
public void
startElement(QName
The name of the element.
element
,
XMLAttributes
The element attributes.
attributes
,
Augmentations
Additional information that may include infoset augmentations
augs
)

Implements org.apache.xerces.xni.XMLDocumentHandler.startElement.

The start of an element.
public void
startExternalSubset(XMLResourceIdentifier
The resource identifier.
identifier
,
Augmentations
Additional information that may include infoset augmentations.
augmentations
)

Implements org.apache.xerces.xni.XMLDTDHandler.startExternalSubset.

The start of the DTD external subset.
public void
startGeneralEntity(String
The name of the entity.
name
,
XMLResourceIdentifier
The resource identifier.
identifier
,
String
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).
encoding
,
Augmentations
Additional information that may include infoset augmentations
augs
)

Implements org.apache.xerces.xni.XMLDocumentHandler.startGeneralEntity.

This method notifies the start of an entity.
public void
startGroup(Augmentations
Additional information that may include infoset augmentations.
augs
)

Implements org.apache.xerces.xni.XMLDTDContentModelHandler.startGroup.

A start of either a mixed or children content model.
public void
startParameterEntity(String
The name of the entity.
name
,
XMLResourceIdentifier
The resource identifier.
identifier
,
String
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).
encoding
,
Augmentations
Additional information that may include infoset augmentations
augs
)

Implements org.apache.xerces.xni.XMLDTDHandler.startParameterEntity.

This method notifies the start of an entity.
public void
textDecl(String
The XML version, or null if not specified.
version
,
String
The IANA encoding name of the entity.
encoding
,
Augmentations
Additional information that may include infoset augmentations
augs
)

Implements org.apache.xerces.xni.XMLDocumentHandler.textDecl, org.apache.xerces.xni.XMLDTDHandler.textDecl.

Notifies of the presence of a TextDecl line in an entity.
public void
unparsedEntityDecl(String
The name of the entity.
name
,
XMLResourceIdentifier
An object containing all location information pertinent to this entity.
identifier
,
String
The name of the notation.
notation
,
Augmentations
Additional information that may include infoset augmentations.
augs
)

Implements org.apache.xerces.xni.XMLDTDHandler.unparsedEntityDecl.

An unparsed entity declaration.
public void
xmlDecl(String
The XML version.
version
,
String
The IANA encoding name of the document, or null if not specified.
encoding
,
String
The standalone value, or null if not specified.
standalone
,
Augmentations
Additional information that may include infoset augmentations
augs
)

Implements org.apache.xerces.xni.XMLDocumentHandler.xmlDecl.

Notifies of the presence of an XMLDecl line in the document.
Inherited from org.apache.xerces.parsers.XMLParser:
parse