XML for Java 2.0.15

com.ibm.xml.parsers
Class SAXParser

java.lang.Object
  |
  +--com.ibm.xml.framework.XMLParser
        |
        +--com.ibm.xml.parsers.SAXParser
Direct Known Subclasses:
ValidatingSAXParser

public class SAXParser
extends XMLParser

Non-validating SAX Parser.

Version:
Revision: 65 1.16 src/com/ibm/xml/parsers/SAXParser.java, parser, xml4j2, xml4j2_0_15

Field Summary
protected  boolean fRootElement
           
 
Fields inherited from class com.ibm.xml.framework.XMLParser
fLocale, fNeedReset, fParseInProgress, fResourceBundle, fScanner
 
Constructor Summary
SAXParser()
          Default constructor.
 
Method Summary
 void attlistDecl(int elementIndex, int attDefIndex)
          Attlist decl.
 void characters(char[] ch, int start, int length, boolean cdataSection)
          Characters.
 void characters(int dataIndex, boolean cdataSection)
          Not called.
 void comment(int dataIndex)
          Comment.
 void doctypeDecl(int rootElementNameIndex)
          This function will be called when a <!DOCTYPE...> declaration is encountered.
 void elementDecl(int elementIndex)
          Element decl.
 void endDocument()
          End document.
 void endElement(int elementNameIndex)
          End element.
 void endEntityReference(int entityIndex)
          End entity reference.
 void endExternalSubset()
          This function will be called at the end of the "external subset" of a doctype declaration.
 void endInternalSubset()
          This function will be called at the end of the "internal subset" of a doctype declaration.
 void externalEntityDecl(int entityIndex)
          External entity decl.
 void ignorableWhitespace(char[] ch, int start, int length, boolean cdataSection)
          Ignorable whitespace.
 void ignorableWhitespace(int dataIndex, boolean cdataSection)
          Not called.
 void internalEntityDecl(int entityIndex)
          Internal entity decl.
 void notationDecl(int notationIndex)
          Notation decl.
 void parameterEntityDecl(int entityIndex)
           
 void parse(InputSource source)
          Parses the specified input source.
 void processingInstruction(int targetIndex, int dataIndex)
          Processing instruction.
 boolean sendCharDataAsCharArray()
          Send char data as array.
 void setDocumentHandler(DocumentHandler handler)
          Sets the document handler.
 void setDTDHandler(DTDHandler handler)
          Sets the DTD handler.
 void setEntityResolver(EntityResolver resolver)
          Sets the entity resolver.
 void startDocument(int versionIndex, int encodingIndex, int standAloneIndex)
          Start document.
 void startElement(int elementNameIndex, int attrListIndex)
          Start element
 void startEntityReference(int entityIndex)
          Start entity reference.
 void startExternalSubset(int publicIdStringIndex, int systemIdStringIndex)
          This function will be called at the start of the "external subset" of a doctype declaration.
 void startInternalSubset()
          This function will be called at the start of the "internal subset" of a doctype declaration.
 void unparsedEntityDecl(int entityIndex)
          Unparsed entity decl.
 
Methods inherited from class com.ibm.xml.framework.XMLParser
checkHandlers, error, error1, error2, error3, error4, errorHandlingEnabled, getAllowJavaEncodingName, getCheckNamespace, getContinueAfterFatalError, getDocumentHandler, getDocumentTypeHandler, getEntityHandler, getErrorHandler, getErrorMsgString, getLocator, getParserState, getScanner, getValidationHandler, getWarningOnDuplicateAttDef, handleError, isFatal, isWarning, loadCatalog, parse, reset, resetOrCopy, setAllowJavaEncodingName, setCheckNamespace, setContinueAfterFatalError, setDocumentHandler, setDocumentTypeHandler, setEntityHandler, setErrorHandler, setLocale, setValidationHandler, setWarningOnDuplicateAttDef, useDefaultValidationHandler
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fRootElement

protected boolean fRootElement
Constructor Detail

SAXParser

public SAXParser()
Default constructor.
Method Detail

setEntityResolver

public void setEntityResolver(EntityResolver resolver)
Sets the entity resolver.
Overrides:
setEntityResolver in class XMLParser

setDTDHandler

public void setDTDHandler(DTDHandler handler)
Sets the DTD handler.
Overrides:
setDTDHandler in class XMLParser

setDocumentHandler

public void setDocumentHandler(DocumentHandler handler)
Sets the document handler.
Overrides:
setDocumentHandler in class XMLParser

doctypeDecl

public void doctypeDecl(int rootElementNameIndex)
                 throws java.lang.Exception
This function will be called when a <!DOCTYPE...> declaration is encountered.

startInternalSubset

public void startInternalSubset()
                         throws java.lang.Exception
This function will be called at the start of the "internal subset" of a doctype declaration.

endInternalSubset

public void endInternalSubset()
                       throws java.lang.Exception
This function will be called at the end of the "internal subset" of a doctype declaration.

startExternalSubset

public void startExternalSubset(int publicIdStringIndex,
                                int systemIdStringIndex)
                         throws java.lang.Exception
This function will be called at the start of the "external subset" of a doctype declaration.

endExternalSubset

public void endExternalSubset()
                       throws java.lang.Exception
This function will be called at the end of the "external subset" of a doctype declaration.

elementDecl

public void elementDecl(int elementIndex)
                 throws java.lang.Exception
Element decl.

attlistDecl

public void attlistDecl(int elementIndex,
                        int attDefIndex)
                 throws java.lang.Exception
Attlist decl.

internalEntityDecl

public void internalEntityDecl(int entityIndex)
                        throws java.lang.Exception
Internal entity decl.

externalEntityDecl

public void externalEntityDecl(int entityIndex)
                        throws java.lang.Exception
External entity decl.

unparsedEntityDecl

public void unparsedEntityDecl(int entityIndex)
                        throws java.lang.Exception
Unparsed entity decl.

parameterEntityDecl

public void parameterEntityDecl(int entityIndex)

notationDecl

public void notationDecl(int notationIndex)
                  throws java.lang.Exception
Notation decl.

sendCharDataAsCharArray

public boolean sendCharDataAsCharArray()
Send char data as array.
Overrides:
sendCharDataAsCharArray in class XMLParser

startDocument

public void startDocument(int versionIndex,
                          int encodingIndex,
                          int standAloneIndex)
                   throws java.lang.Exception
Start document.

endDocument

public void endDocument()
                 throws java.lang.Exception
End document.

startElement

public void startElement(int elementNameIndex,
                         int attrListIndex)
                  throws java.lang.Exception
Start element

endElement

public void endElement(int elementNameIndex)
                throws java.lang.Exception
End element.

startEntityReference

public void startEntityReference(int entityIndex)
                          throws java.lang.Exception
Start entity reference.

endEntityReference

public void endEntityReference(int entityIndex)
                        throws java.lang.Exception
End entity reference.

characters

public void characters(int dataIndex,
                       boolean cdataSection)
                throws java.lang.Exception
Not called.

ignorableWhitespace

public void ignorableWhitespace(int dataIndex,
                                boolean cdataSection)
                         throws java.lang.Exception
Not called.

processingInstruction

public void processingInstruction(int targetIndex,
                                  int dataIndex)
                           throws java.lang.Exception
Processing instruction.

comment

public void comment(int dataIndex)
             throws java.lang.Exception
Comment.

characters

public void characters(char[] ch,
                       int start,
                       int length,
                       boolean cdataSection)
                throws java.lang.Exception
Characters.

ignorableWhitespace

public void ignorableWhitespace(char[] ch,
                                int start,
                                int length,
                                boolean cdataSection)
                         throws java.lang.Exception
Ignorable whitespace.

parse

public void parse(InputSource source)
           throws SAXException,
                  java.io.IOException
Parses the specified input source.
Parameters:
source - The input source.
Throws:
SAXException - Throws exception on SAX error.
java.io.IOException - Throws exception on i/o error.
Overrides:
parse in class XMLParser

XML for Java 2.0.15