APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.org.apache.xerces.internal.parsers

public abstract Class AbstractXMLDocumentParser

extends XMLParser
implements XMLDocumentHandler, XMLDTDHandler, XMLDTDContentModelHandler
Class Inheritance
All Implemented Interfaces
com.sun.org.apache.xerces.internal.xni.XMLDTDContentModelHandler, com.sun.org.apache.xerces.internal.xni.XMLDTDHandler, com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler
Known Direct Subclasses
com.sun.org.apache.xerces.internal.parsers.XMLDocumentParser, com.sun.org.apache.xerces.internal.parsers.AbstractDOMParser, com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser
Imports
com.sun.org.apache.xerces.internal.xni.Augmentations, .NamespaceContext, .QName, .XMLAttributes, .XMLDTDContentModelHandler, .XMLDTDHandler, .XMLDocumentHandler, .XMLLocator, .XMLResourceIdentifier, .XMLString, .XNIException, com.sun.org.apache.xerces.internal.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

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 com.sun.org.apache.xerces.internal.parsers.XMLParser:
configENTITY_RESOLVERERROR_HANDLERfConfigurationsecurityManagersecurityPropertyManager

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 com.sun.org.apache.xerces.internal.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 com.sun.org.apache.xerces.internal.xni.XMLDTDHandler.attributeDecl.

An attribute declaration.

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

Implements com.sun.org.apache.xerces.internal.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 com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler.comment, com.sun.org.apache.xerces.internal.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 com.sun.org.apache.xerces.internal.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 com.sun.org.apache.xerces.internal.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 com.sun.org.apache.xerces.internal.xni.XMLDTDHandler.elementDecl.

An element declaration.

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

Implements com.sun.org.apache.xerces.internal.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 com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler.emptyElement.

An empty element.

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

Implements com.sun.org.apache.xerces.internal.xni.XMLDTDHandler.endAttlist.

The end of an attribute list.

public void
endCDATA(Augmentations
Additional information that may include infoset augmentations
augs
)

Implements com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler.endCDATA.

The end of a CDATA section.

public void
endConditional(Augmentations
Additional information that may include infoset augmentations.
augs
)

Implements com.sun.org.apache.xerces.internal.xni.XMLDTDHandler.endConditional.

The end of a conditional section.

public void
endContentModel(Augmentations
Additional information that may include infoset augmentations.
augs
)

Implements com.sun.org.apache.xerces.internal.xni.XMLDTDContentModelHandler.endContentModel.

The end of a content model.

public void
endDocument(Augmentations
Additional information that may include infoset augmentations
augs
)

Implements com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler.endDocument.

The end of the document.

public void
endDTD(Augmentations
Additional information that may include infoset augmentations.
augs
)

Implements com.sun.org.apache.xerces.internal.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 com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler.endElement.

The end of an element.

public void
endExternalSubset(Augmentations
Additional information that may include infoset augmentations.
augmentations
)

Implements com.sun.org.apache.xerces.internal.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 com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler.endGeneralEntity.

This method notifies the end of an entity.

public void
endGroup(Augmentations
Additional information that may include infoset augmentations.
augs
)

Implements com.sun.org.apache.xerces.internal.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 com.sun.org.apache.xerces.internal.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 com.sun.org.apache.xerces.internal.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 com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler.ignorableWhitespace.

Ignorable whitespace.

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

Implements com.sun.org.apache.xerces.internal.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 com.sun.org.apache.xerces.internal.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 com.sun.org.apache.xerces.internal.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 com.sun.org.apache.xerces.internal.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 com.sun.org.apache.xerces.internal.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 com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler.processingInstruction, com.sun.org.apache.xerces.internal.xni.XMLDTDHandler.processingInstruction.

A processing instruction.

protected void
reset()

Overrides com.sun.org.apache.xerces.internal.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 com.sun.org.apache.xerces.internal.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 com.sun.org.apache.xerces.internal.xni.XMLDTDHandler.startAttlist.

The start of an attribute list.

public void
startCDATA(Augmentations
Additional information that may include infoset augmentations
augs
)

Implements com.sun.org.apache.xerces.internal.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 com.sun.org.apache.xerces.internal.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 com.sun.org.apache.xerces.internal.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 com.sun.org.apache.xerces.internal.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 com.sun.org.apache.xerces.internal.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 com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler.startElement.

The start of an element.

public void
startExternalSubset(XMLResourceIdentifier identifier, Augmentations
Additional information that may include infoset augmentations.
augmentations
)

Implements com.sun.org.apache.xerces.internal.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 com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler.startGeneralEntity.

This method notifies the start of an entity.

public void
startGroup(Augmentations
Additional information that may include infoset augmentations.
augs
)

Implements com.sun.org.apache.xerces.internal.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 com.sun.org.apache.xerces.internal.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 com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler.textDecl, com.sun.org.apache.xerces.internal.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 com.sun.org.apache.xerces.internal.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 com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler.xmlDecl.

Notifies of the presence of an XMLDecl line in the document.

Inherited from com.sun.org.apache.xerces.internal.parsers.XMLParser:
getFeatureinitSecurityManagerparse