Home » Xerces-J-src.2.9.1 » org.apache.xerces » parsers » [javadoc | source]
org.apache.xerces.parsers
abstract public class: AbstractXMLDocumentParser [javadoc | source]
java.lang.Object
   org.apache.xerces.parsers.XMLParser
      org.apache.xerces.parsers.AbstractXMLDocumentParser

All Implemented Interfaces:
    XMLDocumentHandler, XMLDTDContentModelHandler, XMLDTDHandler

Direct Known Subclasses:
    DOMParser, DOMAddLines, DOMParserImpl, XMLDocumentParser, Counter, PSVIParser, DOMASBuilderImpl, SAXParser, DOMParserSaveEncoding, Writer, RevalidatingDOMParser, JAXPSAXParser, CSVParser, AbstractDOMParser, DocumentTracer, AbstractSAXParser

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.
Field Summary
protected  boolean fInDTD    True if inside DTD. 
protected  XMLDocumentSource fDocumentSource    Document source 
protected  XMLDTDSource fDTDSource    DTD source 
protected  XMLDTDContentModelSource fDTDContentModelSource    DTD content model source 
Fields inherited from org.apache.xerces.parsers.XMLParser:
ENTITY_RESOLVER,  ERROR_HANDLER,  fConfiguration
Constructor:
 protected AbstractXMLDocumentParser(XMLParserConfiguration config) 
    Constructs a document parser using the default symbol table and grammar pool.
Method from org.apache.xerces.parsers.AbstractXMLDocumentParser Summary:
any,   attributeDecl,   characters,   comment,   doctypeDecl,   element,   elementDecl,   empty,   emptyElement,   endAttlist,   endCDATA,   endConditional,   endContentModel,   endDTD,   endDocument,   endElement,   endExternalSubset,   endGeneralEntity,   endGroup,   endParameterEntity,   externalEntityDecl,   getDTDContentModelSource,   getDTDSource,   getDocumentSource,   ignorableWhitespace,   ignoredCharacters,   internalEntityDecl,   notationDecl,   occurrence,   pcdata,   processingInstruction,   reset,   separator,   setDTDContentModelSource,   setDTDSource,   setDocumentSource,   startAttlist,   startCDATA,   startConditional,   startContentModel,   startDTD,   startDocument,   startElement,   startExternalSubset,   startGeneralEntity,   startGroup,   startParameterEntity,   textDecl,   unparsedEntityDecl,   xmlDecl
Methods from org.apache.xerces.parsers.XMLParser:
parse,   reset
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.xerces.parsers.AbstractXMLDocumentParser Detail:
 public  void any(Augmentations augs) throws XNIException 
    A content model of ANY.
 public  void attributeDecl(String elementName,
    String attributeName,
    String type,
    String[] enumeration,
    String defaultType,
    XMLString defaultValue,
    XMLString nonNormalizedDefaultValue,
    Augmentations augs) throws XNIException 
    An attribute declaration.
 public  void characters(XMLString text,
    Augmentations augs) throws XNIException 
    Character content.
 public  void comment(XMLString text,
    Augmentations augs) throws XNIException 
    A comment.
 public  void doctypeDecl(String rootElement,
    String publicId,
    String systemId,
    Augmentations augs) throws XNIException 
    Notifies of the presence of the DOCTYPE line in the document.
 public  void element(String elementName,
    Augmentations augs) throws XNIException 
    A referenced element in a mixed or children content model.
 public  void elementDecl(String name,
    String contentModel,
    Augmentations augs) throws XNIException 
    An element declaration.
 public  void empty(Augmentations augs) throws XNIException 
    A content model of EMPTY.
 public  void emptyElement(QName element,
    XMLAttributes attributes,
    Augmentations augs) throws XNIException 
    An empty element.
 public  void endAttlist(Augmentations augs) throws XNIException 
    The end of an attribute list.
 public  void endCDATA(Augmentations augs) throws XNIException 
    The end of a CDATA section.
 public  void endConditional(Augmentations augs) throws XNIException 
    The end of a conditional section.
 public  void endContentModel(Augmentations augs) throws XNIException 
    The end of a content model.
 public  void endDTD(Augmentations augs) throws XNIException 
    The end of the DTD.
 public  void endDocument(Augmentations augs) throws XNIException 
    The end of the document.
 public  void endElement(QName element,
    Augmentations augs) throws XNIException 
    The end of an element.
 public  void endExternalSubset(Augmentations augmentations) throws XNIException 
    The end of the DTD external subset.
 public  void endGeneralEntity(String name,
    Augmentations augs) throws XNIException 
    This method notifies the end of an entity.

    Note: This method is not called for entity references appearing as part of attribute values.

 public  void endGroup(Augmentations augs) throws XNIException 
    The end of a group for mixed or children content models.
 public  void endParameterEntity(String name,
    Augmentations augs) throws XNIException 
    This method notifies the end of an entity.

    Note: This method is not called for entity references appearing as part of attribute values.

 public  void externalEntityDecl(String name,
    XMLResourceIdentifier identifier,
    Augmentations augs) throws XNIException 
    An external entity declaration.
 public XMLDTDContentModelSource getDTDContentModelSource() 
 public XMLDTDSource getDTDSource() 
 public XMLDocumentSource getDocumentSource() 
    Returns the document source
 public  void ignorableWhitespace(XMLString text,
    Augmentations augs) throws 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.
 public  void ignoredCharacters(XMLString text,
    Augmentations augs) throws XNIException 
    Characters within an IGNORE conditional section.
 public  void internalEntityDecl(String name,
    XMLString text,
    XMLString nonNormalizedText,
    Augmentations augs) throws XNIException 
    An internal entity declaration.
 public  void notationDecl(String name,
    XMLResourceIdentifier identifier,
    Augmentations augs) throws XNIException 
    A notation declaration
 public  void occurrence(short occurrence,
    Augmentations augs) throws XNIException 
    The occurrence count for a child in a children content model or for the mixed content model group.
 public  void pcdata(Augmentations augs) throws XNIException 
    The appearance of "#PCDATA" within a group signifying a mixed content model. This method will be the first called following the content model's startGroup().
 public  void processingInstruction(String target,
    XMLString data,
    Augmentations augs) throws 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.

 protected  void reset() throws XNIException 
    reset all components before parsing
 public  void separator(short separator,
    Augmentations augs) throws XNIException 
    The separator between choices or sequences of a mixed or children content model.
 public  void setDTDContentModelSource(XMLDTDContentModelSource source) 
 public  void setDTDSource(XMLDTDSource source) 
 public  void setDocumentSource(XMLDocumentSource source) 
    Sets the document source
 public  void startAttlist(String elementName,
    Augmentations augs) throws XNIException 
    The start of an attribute list.
 public  void startCDATA(Augmentations augs) throws XNIException 
    The start of a CDATA section.
 public  void startConditional(short type,
    Augmentations augs) throws XNIException 
    The start of a conditional section.
 public  void startContentModel(String elementName,
    Augmentations augs) throws XNIException 
    The start of a content model. Depending on the type of the content model, specific methods may be called between the call to the startContentModel method and the call to the endContentModel method.
 public  void startDTD(XMLLocator locator,
    Augmentations augs) throws XNIException 
    The start of the DTD.
 public  void startDocument(XMLLocator locator,
    String encoding,
    NamespaceContext namespaceContext,
    Augmentations augs) throws XNIException 
    The start of the document.
 public  void startElement(QName element,
    XMLAttributes attributes,
    Augmentations augs) throws XNIException 
    The start of an element. If the document specifies the start element by using an empty tag, then the startElement method will immediately be followed by the endElement method, with no intervening methods.
 public  void startExternalSubset(XMLResourceIdentifier identifier,
    Augmentations augmentations) throws XNIException 
    The start of the DTD external subset.
 public  void startGeneralEntity(String name,
    XMLResourceIdentifier identifier,
    String encoding,
    Augmentations augs) throws XNIException 
    This method notifies the start of an entity.

    Note: This method is not called for entity references appearing as part of attribute values.

 public  void startGroup(Augmentations augs) throws XNIException 
    A start of either a mixed or children content model. A mixed content model will immediately be followed by a call to the pcdata() method. A children content model will contain additional groups and/or elements.
 public  void startParameterEntity(String name,
    XMLResourceIdentifier identifier,
    String encoding,
    Augmentations augs) throws XNIException 
    This method notifies the start of an entity.

    Note: This method is not called for entity references appearing as part of attribute values.

 public  void textDecl(String version,
    String encoding,
    Augmentations augs) throws XNIException 
    Notifies of the presence of a TextDecl line in an entity. If present, this method will be called immediately following the startEntity call.

    Note: This method will never be called for the document entity; it is only called for external general entities referenced in document content.

    Note: This method is not called for entity references appearing as part of attribute values.

 public  void unparsedEntityDecl(String name,
    XMLResourceIdentifier identifier,
    String notation,
    Augmentations augs) throws XNIException 
    An unparsed entity declaration.
 public  void xmlDecl(String version,
    String encoding,
    String standalone,
    Augmentations augs) throws XNIException 
    Notifies of the presence of an XMLDecl line in the document. If present, this method will be called immediately following the startDocument call.