|
Xerces 2.0.0.alpha | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.xerces.parsers.XMLParser | +--org.apache.xerces.parsers.XMLDocumentParser | +--org.apache.xerces.parsers.SAXParser
Fields inherited from class org.apache.xerces.parsers.XMLDocumentParser |
fDatatypeValidatorFactory, fDTDScanner, fGrammarPool, fParseInProgress, fScanner, fValidator |
Fields inherited from class org.apache.xerces.parsers.XMLParser |
fEntityManager, fErrorReporter, fFeatures, fLocator, fProperties, fSymbolTable |
Fields inherited from interface org.apache.xerces.xni.XMLDTDHandler |
CONDITIONAL_IGNORE, CONDITIONAL_INCLUDE |
Fields inherited from interface org.apache.xerces.xni.XMLDTDContentModelHandler |
OCCURS_ONE_OR_MORE, OCCURS_ZERO_OR_MORE, OCCURS_ZERO_OR_ONE, SEPARATOR_CHOICE, SEPARATOR_SEQUENCE, TYPE_ANY, TYPE_CHILDREN, TYPE_EMPTY, TYPE_MIXED |
Constructor Summary | |
SAXParser()
Default constructor. |
|
SAXParser(org.apache.xerces.util.SymbolTable symbolTable,
org.apache.xerces.impl.validation.GrammarPool grammarPool)
Constructor allowing to specify the SymbolTable and GrammarPool to use. |
Method Summary | |
void |
attributeDecl(java.lang.String elementName,
java.lang.String attributeName,
java.lang.String type,
java.lang.String[] enumeration,
java.lang.String defaultType,
org.apache.xerces.xni.XMLString defaultValue)
attributeDecl |
void |
characters(org.apache.xerces.xni.XMLString text)
Character content. |
void |
comment(org.apache.xerces.xni.XMLString text)
comment |
void |
doctypeDecl(java.lang.String rootElement,
java.lang.String publicId,
java.lang.String systemId)
Notifies of the presence of the DOCTYPE line in the document. |
void |
elementDecl(java.lang.String name,
java.lang.String contentModel)
elementDecl |
void |
endAttlist()
endAttlist |
void |
endConditional()
endConditional |
void |
endDocument()
The end of the document. |
void |
endDTD()
endDTD |
void |
endElement(org.apache.xerces.xni.QName element)
The end of an element. |
void |
endExternalSubset()
endExternalSubset |
void |
externalEntityDecl(java.lang.String name,
java.lang.String publicId,
java.lang.String systemId)
Report a parsed external entity declaration. |
ContentHandler |
getContentHandler()
Return the current content handler. |
protected DeclHandler |
getDeclHandler()
Returns the DTD declaration event handler. |
DTDHandler |
getDTDHandler()
Return the current DTD handler. |
boolean |
getFeature(java.lang.String featureId)
Query the state of a feature. |
protected LexicalHandler |
getLexicalHandler()
Returns the lexical handler. |
java.lang.Object |
getProperty(java.lang.String propertyId)
Query the value of a property. |
void |
ignorableWhitespace(org.apache.xerces.xni.XMLString text)
Ignorable whitespace. |
void |
internalEntityDecl(java.lang.String name,
org.apache.xerces.xni.XMLString text)
internalEntityDecl |
void |
notationDecl(java.lang.String name,
java.lang.String publicId,
java.lang.String systemId)
notationDecl |
void |
processingInstruction(java.lang.String target,
org.apache.xerces.xni.XMLString data)
processingInstruction |
void |
setContentHandler(ContentHandler handler)
Allow an application to register a content event handler. |
protected void |
setDeclHandler(DeclHandler handler)
Set the DTD declaration event handler. |
void |
setDocumentHandler(DocumentHandler documentHandler)
Sets the document handler. |
void |
setDTDHandler(DTDHandler handler)
Allow an application to register a DTD event handler. |
void |
setFeature(java.lang.String featureId,
boolean state)
Set the state of any feature in a SAX2 parser. |
protected void |
setLexicalHandler(LexicalHandler handler)
Set the lexical event handler. |
void |
setProperty(java.lang.String propertyId,
java.lang.Object value)
Set the value of any property in a SAX2 parser. |
void |
startAttlist(java.lang.String elementName)
startAttlist |
void |
startConditional(short type)
startConditional |
void |
startDocument()
The start of the document. |
void |
startDTD()
startDTD |
void |
startElement(org.apache.xerces.xni.QName element,
org.apache.xerces.xni.XMLAttributes attributes)
The start of an element. |
void |
startExternalSubset()
startExternalSubset |
void |
unparsedEntityDecl(java.lang.String name,
java.lang.String publicId,
java.lang.String systemId,
java.lang.String notation)
unparsedEntityDecl |
Methods inherited from class org.apache.xerces.parsers.XMLDocumentParser |
checkFeature, checkProperty, childrenElement, childrenEndGroup, childrenOccurrence, childrenSeparator, childrenStartGroup, endCDATA, endContentModel, endEntity, endPrefixMapping, mixedElement, parse, reset, startCDATA, startContentModel, startEntity, startPrefixMapping, textDecl, xmlDecl |
Methods inherited from class org.apache.xerces.parsers.XMLParser |
getEntityResolver, getErrorHandler, parse, setEntityResolver, setErrorHandler, setLocale |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.xerces.xni.XMLDTDHandler |
endEntity, startEntity, textDecl |
Methods inherited from interface org.xml.sax.Parser |
parse, parse, setEntityResolver, setErrorHandler, setLocale |
Methods inherited from interface org.xml.sax.XMLReader |
getEntityResolver, getErrorHandler, parse, parse, setEntityResolver, setErrorHandler |
Constructor Detail |
public SAXParser()
public SAXParser(org.apache.xerces.util.SymbolTable symbolTable, org.apache.xerces.impl.validation.GrammarPool grammarPool)
symbolTable
- grammarPool
- Method Detail |
public void startDocument() throws SAXException
XMLDocumentParser
startDocument
in class XMLDocumentParser
org.apache.xerces.parsers.XMLDocumentParser
SAXException
- Thrown by handler to signal an error.public void startElement(org.apache.xerces.xni.QName element, org.apache.xerces.xni.XMLAttributes attributes) throws SAXException
XMLDocumentParser
startElement
in class XMLDocumentParser
org.apache.xerces.parsers.XMLDocumentParser
element
- The name of the element.attributes
- The element attributes.SAXException
- Thrown by handler to signal an error.public void characters(org.apache.xerces.xni.XMLString text) throws SAXException
XMLDocumentParser
characters
in class XMLDocumentParser
org.apache.xerces.parsers.XMLDocumentParser
text
- The content.SAXException
- Thrown by handler to signal an error.public void ignorableWhitespace(org.apache.xerces.xni.XMLString text) throws SAXException
XMLDocumentParser
ignorableWhitespace
in class XMLDocumentParser
org.apache.xerces.parsers.XMLDocumentParser
text
- The ignorable whitespace.SAXException
- Thrown by handler to signal an error.public void endElement(org.apache.xerces.xni.QName element) throws SAXException
XMLDocumentParser
endElement
in class XMLDocumentParser
org.apache.xerces.parsers.XMLDocumentParser
element
- The name of the element.SAXException
- Thrown by handler to signal an error.public void endDocument() throws SAXException
XMLDocumentParser
endDocument
in class XMLDocumentParser
org.apache.xerces.parsers.XMLDocumentParser
SAXException
- Thrown by handler to signal an error.public void startDTD() throws SAXException
startDTD
in interface org.apache.xerces.xni.XMLDTDHandler
startDTD
in class XMLDocumentParser
org.apache.xerces.parsers.XMLDocumentParser
SAXException
- Thrown by handler to signal an error.public void doctypeDecl(java.lang.String rootElement, java.lang.String publicId, java.lang.String systemId) throws SAXException
XMLDocumentParser
doctypeDecl
in class XMLDocumentParser
rootElement
- publicId
- systemId
- public void comment(org.apache.xerces.xni.XMLString text) throws SAXException
comment
in interface org.apache.xerces.xni.XMLDTDHandler
comment
in class XMLDocumentParser
text
- public void processingInstruction(java.lang.String target, org.apache.xerces.xni.XMLString data) throws SAXException
processingInstruction
in interface org.apache.xerces.xni.XMLDTDHandler
processingInstruction
in class XMLDocumentParser
target
- data
- public void startExternalSubset() throws SAXException
public void endExternalSubset() throws SAXException
public void elementDecl(java.lang.String name, java.lang.String contentModel) throws SAXException
elementDecl
in interface org.apache.xerces.xni.XMLDTDHandler
elementDecl
in class XMLDocumentParser
name
- contentModel
- public void startAttlist(java.lang.String elementName) throws SAXException
startAttlist
in interface org.apache.xerces.xni.XMLDTDHandler
startAttlist
in class XMLDocumentParser
elementName
- public void attributeDecl(java.lang.String elementName, java.lang.String attributeName, java.lang.String type, java.lang.String[] enumeration, java.lang.String defaultType, org.apache.xerces.xni.XMLString defaultValue) throws SAXException
attributeDecl
in interface org.apache.xerces.xni.XMLDTDHandler
attributeDecl
in class XMLDocumentParser
elementName
- attributeName
- type
- enumeration
- defaultType
- defaultValue
- public void endAttlist() throws SAXException
endAttlist
in interface org.apache.xerces.xni.XMLDTDHandler
endAttlist
in class XMLDocumentParser
org.apache.xerces.parsers.XMLDocumentParser
SAXException
- Thrown by handler to signal an error.public void internalEntityDecl(java.lang.String name, org.apache.xerces.xni.XMLString text) throws SAXException
internalEntityDecl
in interface org.apache.xerces.xni.XMLDTDHandler
internalEntityDecl
in class XMLDocumentParser
name
- text
- public void externalEntityDecl(java.lang.String name, java.lang.String publicId, java.lang.String systemId) throws SAXException
externalEntityDecl
in interface org.apache.xerces.xni.XMLDTDHandler
externalEntityDecl
in class XMLDocumentParser
name
- publicId
- systemId
- public void unparsedEntityDecl(java.lang.String name, java.lang.String publicId, java.lang.String systemId, java.lang.String notation) throws SAXException
unparsedEntityDecl
in interface org.apache.xerces.xni.XMLDTDHandler
unparsedEntityDecl
in class XMLDocumentParser
name
- publicId
- systemId
- notation
- public void notationDecl(java.lang.String name, java.lang.String publicId, java.lang.String systemId) throws SAXException
notationDecl
in interface org.apache.xerces.xni.XMLDTDHandler
notationDecl
in class XMLDocumentParser
name
- publicId
- systemId
- public void startConditional(short type) throws SAXException
startConditional
in interface org.apache.xerces.xni.XMLDTDHandler
startConditional
in class XMLDocumentParser
type
- public void endConditional() throws SAXException
endConditional
in interface org.apache.xerces.xni.XMLDTDHandler
endConditional
in class XMLDocumentParser
org.apache.xerces.parsers.XMLDocumentParser
SAXException
- Thrown by handler to signal an error.public void endDTD() throws SAXException
endDTD
in interface org.apache.xerces.xni.XMLDTDHandler
endDTD
in class XMLDocumentParser
org.apache.xerces.parsers.XMLDocumentParser
SAXException
- Thrown by handler to signal an error.public void setDTDHandler(DTDHandler handler)
If the application does not register a DTD handler, all DTD events reported by the SAX parser will be silently ignored.
Applications may register a new or different handler in the middle of a parse, and the SAX parser must begin using the new handler immediately.
setDTDHandler
in interface Parser
handler
- The DTD handler.java.lang.NullPointerException
- If the handler
argument is null.getDTDHandler()
public void setDocumentHandler(DocumentHandler documentHandler)
setDocumentHandler
in interface Parser
documentHandler
- public void setContentHandler(ContentHandler handler)
If the application does not register a content handler, all content events reported by the SAX parser will be silently ignored.
Applications may register a new or different handler in the middle of a parse, and the SAX parser must begin using the new handler immediately.
setContentHandler
in interface XMLReader
handler
- The content handler.java.lang.NullPointerException
- If the handler
argument is null.getContentHandler()
public ContentHandler getContentHandler()
getContentHandler
in interface XMLReader
setContentHandler(org.xml.sax.ContentHandler)
public DTDHandler getDTDHandler()
getDTDHandler
in interface XMLReader
setDTDHandler(org.xml.sax.DTDHandler)
protected void setDeclHandler(DeclHandler handler) throws SAXNotRecognizedException, SAXNotSupportedException
This method is the equivalent to the property:
http://xml.org/sax/properties/declaration-handler
handler
- The new handler.getDeclHandler()
,
setProperty(java.lang.String, java.lang.Object)
protected DeclHandler getDeclHandler() throws SAXNotRecognizedException, SAXNotSupportedException
setDeclHandler(org.xml.sax.ext.DeclHandler)
protected void setLexicalHandler(LexicalHandler handler) throws SAXNotRecognizedException, SAXNotSupportedException
This method is the equivalent to the property:
http://xml.org/sax/properties/lexical-handler
handler
- lexical event handlergetLexicalHandler()
,
setProperty(java.lang.String, java.lang.Object)
protected LexicalHandler getLexicalHandler() throws SAXNotRecognizedException, SAXNotSupportedException
setLexicalHandler(org.xml.sax.ext.LexicalHandler)
public void setFeature(java.lang.String featureId, boolean state) throws SAXNotRecognizedException, SAXNotSupportedException
setFeature
in interface XMLReader
setFeature
in class XMLDocumentParser
featureId
- The unique identifier (URI) of the feature.state
- The requested state of the feature (true or false).SAXNotRecognizedException
- If the
requested feature is not known.SAXNotSupportedException
- If the
requested feature is known, but the requested
state is not supported.public boolean getFeature(java.lang.String featureId) throws SAXNotRecognizedException, SAXNotSupportedException
getFeature
in interface XMLReader
getFeature
in class XMLParser
featureId
- The unique identifier (URI) of the feature
being set.SAXNotRecognizedException
- If the
requested feature is not known.SAXNotSupportedException
- If the
requested feature is known but not supported.public void setProperty(java.lang.String propertyId, java.lang.Object value) throws SAXNotRecognizedException, SAXNotSupportedException
setProperty
in interface XMLReader
setProperty
in class XMLDocumentParser
propertyId
- The unique identifier (URI) of the property
being set.Object
- The value to which the property is being set.SAXNotRecognizedException
- If the
requested property is not known.SAXNotSupportedException
- If the
requested property is known, but the requested
value is not supported.public java.lang.Object getProperty(java.lang.String propertyId) throws SAXNotRecognizedException, SAXNotSupportedException
getProperty
in interface XMLReader
getProperty
in class XMLParser
propertyId
- The unique identifier (URI) of the property
being set.SAXNotRecognizedException
- If the
requested property is not known.SAXNotSupportedException
- If the
requested property is known but not supported.
|
Xerces 2.0.0.alpha | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |