|
Xerces 1.0.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.xerces.framework.XMLParser | +--org.apache.xerces.parsers.SAXParser
SAXParser provides a parser which implements the SAX1 and SAX2 parser APIs
Fields inherited from class org.apache.xerces.framework.XMLParser |
fCurrentElementEntity,
fCurrentElementType,
fDTDValidator,
fElementDepth,
fEntityHandler,
fErrorReporter,
fInElementContent,
fNamespacesEnabled,
fNamespaceSep,
fParseInProgress,
fReaderFactory,
fScanner,
fSchemaValidator,
fStringPool,
fValidator,
SAX2_FEATURES_PREFIX,
SAX2_HANDLERS_PREFIX,
SAX2_PROPERTIES_PREFIX,
XERCES_FEATURES_PREFIX,
XERCES_PROPERTIES_PREFIX |
Constructor Summary | |
SAXParser()
Default constructor. |
Method Summary | |
void |
attlistDecl(int elementTypeIndex,
int attrNameIndex,
int attType,
java.lang.String enumString,
int attDefaultType,
int attDefaultValue)
Report an attribute type declaration. |
void |
characters(char[] ch,
int start,
int length)
Characters. |
void |
characters(int dataIndex)
Not called. |
void |
comment(int dataIndex)
Comment. |
void |
commentInDTD(int dataIndex)
Callback for comment in DTD. |
void |
elementDecl(int elementType,
XMLValidator.ContentSpec contentSpec)
Report an element type declaration. |
void |
endCDATA()
End CDATA section. |
void |
endDocument()
End document. |
void |
endDTD()
This function will be called at the end of the DTD. |
void |
endElement(int elementType)
End element. |
void |
endEntityReference(int entityName,
int entityType,
int entityContext)
End entity reference. |
void |
endNamespaceDeclScope(int prefix)
Report the end of the scope of a namespace declaration. |
void |
externalEntityDecl(int entityName,
int publicId,
int systemId)
Report a parsed external general entity declaration. |
void |
externalPEDecl(int entityName,
int publicId,
int systemId)
Report a parsed external parameter entity declaration. |
protected org.xml.sax.misc.DeclHandler |
getDeclHandler()
Returns the DTD declaration event handler. |
boolean |
getFeature(java.lang.String featureId)
Query the state of a feature. |
java.lang.String[] |
getFeaturesRecognized()
Returns a list of features that this parser recognizes. |
protected org.xml.sax.misc.LexicalHandler |
getLexicalHandler()
Returns the lexical handler. |
protected org.xml.sax.misc.NamespaceHandler |
getNamespaceHandler()
Returns the namespace declaration scope event handler. |
protected boolean |
getNormalizeText()
Note: This feature is always false. |
java.lang.String[] |
getPropertiesRecognized()
Returns a list of properties that this parser recognizes. |
java.lang.Object |
getProperty(java.lang.String propertyId)
Query the value of a property. |
protected boolean |
getUseLocator()
Note: This feature is always true. |
void |
ignorableWhitespace(char[] ch,
int start,
int length)
Ignorable whitespace. |
void |
ignorableWhitespace(int dataIndex)
Not called. |
void |
internalEntityDecl(int entityName,
int entityValue)
Report an internal general entity declaration. |
void |
internalPEDecl(int entityName,
int entityValue)
Report an internal parameter entity declaration. |
void |
notationDecl(int notationName,
int publicId,
int systemId)
Receive notification of a notation declaration event. |
void |
processingInstruction(int piTarget,
int piData)
Processing instruction. |
void |
processingInstructionInDTD(int piTarget,
int piData)
Callback for processing instruction in DTD. |
protected void |
setDeclHandler(org.xml.sax.misc.DeclHandler handler)
Set the DTD declaration event handler. |
void |
setDocumentHandler(DocumentHandler handler)
Sets the document handler. |
void |
setDTDHandler(DTDHandler handler)
Sets the DTD handler. |
void |
setFeature(java.lang.String featureId,
boolean state)
Set the state of any feature in a SAX2 parser. |
protected void |
setLexicalHandler(org.xml.sax.misc.LexicalHandler handler)
Set the lexical event handler. |
protected void |
setNamespaceHandler(org.xml.sax.misc.NamespaceHandler handler)
Set the namespace declaration scope event handler. |
protected void |
setNormalizeText(boolean normalize)
Note: Currently, the parser does not support this feature. Setting this feature to true will throw a SAXNotSupportedException. |
void |
setProperty(java.lang.String propertyId,
java.lang.Object value)
Set the value of any property in a SAX2 parser. |
protected void |
setUseLocator(boolean use)
Note: Currently, this parser always sets the locator. Setting this feature to false will throw a SAXNotSupportedException. |
void |
startCDATA()
Start CDATA section. |
void |
startDocument(int versionIndex,
int encodingIndex,
int standaloneIndex)
Start document. |
void |
startDTD(int rootElementType,
int publicId,
int systemId)
This function will be called when a <!DOCTYPE...> declaration is encountered. |
void |
startElement(int elementType,
XMLAttrList attrList,
int attrListIndex)
Start element |
void |
startEntityReference(int entityName,
int entityType,
int entityContext)
Start entity reference. |
void |
startNamespaceDeclScope(int prefix,
int uri)
Report the start of the scope of a namespace declaration. |
void |
unparsedEntityDecl(int entityName,
int publicId,
int systemId,
int notationName)
Receive notification of an unparsed entity declaration event. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public SAXParser()
Method Detail |
public java.lang.String[] getFeaturesRecognized()
XMLParser.isFeatureRecognized(java.lang.String)
,
setFeature(java.lang.String, boolean)
,
getFeature(java.lang.String)
public java.lang.String[] getPropertiesRecognized()
XMLParser.isPropertyRecognized(java.lang.String)
,
setProperty(java.lang.String, java.lang.Object)
,
getProperty(java.lang.String)
protected void setNormalizeText(boolean normalize) throws SAXException
Ensures that all consecutive text is returned in a single callback to the DocumentHandler.characters or DocumentHandler.ignorableWhitespace methods.
This method is the equivalent to the feature:
http://xml.org/sax/features/normalize-text
normalize
- True to normalize; false not to normalize.getNormalizeText()
,
setFeature(java.lang.String, boolean)
protected boolean getNormalizeText() throws SAXException
Returns true if the parser normalizes all consecutive text into a single callback to the DocumentHandler.characters or DocumentHandler.ignorableWhitespace methods.
setNormalizeText(boolean)
protected void setUseLocator(boolean use) throws SAXException
Provide a Locator using the DocumentHandler.setDocumentLocator callback (true), or explicitly do not provide one (false).
This method is the equivalent to the feature:
http://xml.org/sax/features/use-locator
getUseLocator()
,
setFeature(java.lang.String, boolean)
protected boolean getUseLocator() throws SAXException
Returns true if the locator is always set.
setUseLocator(boolean)
protected void setDeclHandler(org.xml.sax.misc.DeclHandler handler) throws SAXException
This method is the equivalent to the property:
http://xml.org/sax/handlers/DeclHandler
handler
- The new handler.getDeclHandler()
,
setProperty(java.lang.String, java.lang.Object)
protected org.xml.sax.misc.DeclHandler getDeclHandler() throws SAXException
setDeclHandler(org.xml.sax.misc.DeclHandler)
protected void setLexicalHandler(org.xml.sax.misc.LexicalHandler handler) throws SAXException
This method is the equivalent to the property:
http://xml.org/sax/handlers/LexicalHandler
handler
- lexical event handlergetLexicalHandler()
,
setProperty(java.lang.String, java.lang.Object)
protected org.xml.sax.misc.LexicalHandler getLexicalHandler() throws SAXException
setLexicalHandler(org.xml.sax.misc.LexicalHandler)
protected void setNamespaceHandler(org.xml.sax.misc.NamespaceHandler handler) throws SAXException
This method is the equivalent to the property:
http://xml.org/sax/handlers/NamespaceHandler
handler
- namespace event handlergetNamespaceHandler()
,
setProperty(java.lang.String, java.lang.Object)
protected org.xml.sax.misc.NamespaceHandler getNamespaceHandler() throws SAXException
setNamespaceHandler(org.xml.sax.misc.NamespaceHandler)
public void setFeature(java.lang.String featureId, boolean state) throws SAXException
featureId
- The unique identifier (URI) of the feature.state
- The requested state of the feature (true or false).public boolean getFeature(java.lang.String featureId) throws SAXException
featureId
- The unique identifier (URI) of the feature
being set.public void setProperty(java.lang.String propertyId, java.lang.Object value) throws SAXException
propertyId
- The unique identifier (URI) of the property
being set.Object
- The value to which the property is being set.public java.lang.Object getProperty(java.lang.String propertyId) throws SAXException
propertyId
- The unique identifier (URI) of the property
being set.Configurable.getProperty(java.lang.String)
public void setDTDHandler(DTDHandler handler)
handler
- The DTD handler.DTDHandler
,
HandlerBase
public void setDocumentHandler(DocumentHandler handler)
handler
- The document handler.DocumentHandler
,
HandlerBase
public void startDTD(int rootElementType, int publicId, int systemId) throws java.lang.Exception
rootElementType
- element handle for the root element of the documentpublicId
- string pool index of the DTD's public IDsystemId
- string pool index of the DTD's system IDpublic void endDTD() throws java.lang.Exception
public void elementDecl(int elementType, XMLValidator.ContentSpec contentSpec) throws java.lang.Exception
name
- The element type name.model
- The content model as a normalized string.public void attlistDecl(int elementTypeIndex, int attrNameIndex, int attType, java.lang.String enumString, int attDefaultType, int attDefaultValue) throws java.lang.Exception
eName
- The name of the associated element.aName
- The name of the attribute.type
- A string representing the attribute type.valueDefault
- A string representing the attribute default
("#IMPLIED", "#REQUIRED", or "#FIXED") or null if
none of these applies.value
- A string representing the attribute's default value,
or null if there is none.public void internalPEDecl(int entityName, int entityValue) throws java.lang.Exception
entityName
- string pool index of the entity nameentityValue
- string pool index of the entity replacement textpublic void externalPEDecl(int entityName, int publicId, int systemId) throws java.lang.Exception
entityName
- string pool index of the entity namepublicId
- string pool index of the entity's public id.systemId
- string pool index of the entity's system id.public void internalEntityDecl(int entityName, int entityValue) throws java.lang.Exception
entityName
- string pool index of the entity nameentityValue
- string pool index of the entity replacement textpublic void externalEntityDecl(int entityName, int publicId, int systemId) throws java.lang.Exception
entityName
- string pool index of the entity namepublicId
- string pool index of the entity's public id.systemId
- string pool index of the entity's system id.public void unparsedEntityDecl(int entityName, int publicId, int systemId, int notationName) throws java.lang.Exception
entityName
- string pool index of the entity namepublicId
- string pool index of the entity's public id.systemId
- string pool index of the entity's system id.notationName
- string pool index of the notation name.public void notationDecl(int notationName, int publicId, int systemId) throws java.lang.Exception
notationName
- string pool index of the notation namepublicId
- string pool index of the notation's public id.systemId
- string pool index of the notation's system id.public void startDocument(int versionIndex, int encodingIndex, int standaloneIndex) throws java.lang.Exception
version
- string pool index of the version attribute's valueencoding
- string pool index of the encoding attribute's valuestandAlone
- string pool index of the standalone attribute's valuepublic void endDocument() throws java.lang.Exception
public void startNamespaceDeclScope(int prefix, int uri) throws java.lang.Exception
prefix
- string pool index of the namespace prefix being declareduri
- string pool index of the namespace uri begin boundjava.lang.Exception
- public void endNamespaceDeclScope(int prefix) throws java.lang.Exception
prefix
- string pool index of the namespace prefix being declaredpublic void startElement(int elementType, XMLAttrList attrList, int attrListIndex) throws java.lang.Exception
elementType
- element handle for the element being scannedattrList
- attrList containing the attributes of the elementattrListHandle
- handle into attrList. Allows attributes to be retreived.public void endElement(int elementType) throws java.lang.Exception
elementType
- element handle for the element being scannedpublic void startEntityReference(int entityName, int entityType, int entityContext) throws java.lang.Exception
entityName
- string pool index of the entity nameentityType
- the XMLEntityHandler.ENTITYTYPE_* typeentityContext
- the XMLEntityHandler.CONTEXT_* type for where
the entity reference appearsXMLEntityHandler
,
XMLEntityHandler
public void endEntityReference(int entityName, int entityType, int entityContext) throws java.lang.Exception
entityName
- string pool index of the entity anementityType
- the XMLEntityHandler.ENTITYTYPE_* typeentityContext
- the XMLEntityHandler.CONTEXT_* type for where
the entity reference appearsXMLEntityHandler
,
XMLEntityHandler
public void startCDATA() throws java.lang.Exception
public void endCDATA() throws java.lang.Exception
public void characters(int dataIndex) throws java.lang.Exception
data
- string pool index of the characters that were scannedpublic void ignorableWhitespace(int dataIndex) throws java.lang.Exception
data
- string pool index of ignorable whitespacepublic void processingInstruction(int piTarget, int piData) throws java.lang.Exception
target
- string pool index of the PI targetdata
- string pool index of the PI datapublic void processingInstructionInDTD(int piTarget, int piData) throws java.lang.Exception
target
- the string pool index of the PI's targetdata
- the string pool index of the PI's datapublic void comment(int dataIndex) throws java.lang.Exception
comment
- string pool index of the comment textpublic void commentInDTD(int dataIndex) throws java.lang.Exception
comment
- the string pool index of the comment textpublic void characters(char[] ch, int start, int length) throws java.lang.Exception
ch
- character array containing the characters that were scannedstart
- offset in ch where scanned characters beginlength
- length of scanned characters in chpublic void ignorableWhitespace(char[] ch, int start, int length) throws java.lang.Exception
ch
- character array containing the whitespace that was scannedstart
- offset in ch where scanned whitespace beginslength
- length of scanned whitespace in ch
|
Xerces 1.0.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |