|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.xml.parsers.SAXParser
org.eclipse.ercp.xml.parser.AbstractSAXParserImpl
org.eclipse.ercp.jaxp.implForCore.SAXParserImpl
public class SAXParserImpl
SAXParser implementation for jclCore and bigger
Field Summary |
---|
Constructor Summary | |
---|---|
SAXParserImpl()
|
Method Summary | |
---|---|
protected boolean |
canDoStringInterning()
|
protected void |
characters(char[] ch,
int start,
int length)
Match the SAX API |
protected void |
endCDATA()
Match the SAX2 API: Fire endCDATA event |
protected void |
endDocument()
End the parsing |
protected void |
endElement(java.lang.String qName,
java.lang.String namespace,
java.lang.String localName)
Match the SAX API |
protected void |
endPrefixMapping(NSDeclaration nsDecl)
Ending prefix Mapping |
protected void |
fatalError(java.lang.String errorMsg,
java.lang.String parameter)
A fatal error was encountered. |
ContentHandler |
getContentHandler()
Return the current content handler. |
DTDHandler |
getDTDHandler()
Return the current DTD handler. |
EntityResolver |
getEntityResolver()
Return the current entity resolver. |
ErrorHandler |
getErrorHandler()
Return the current error handler. |
protected java.lang.Object |
getLexicalHandler()
|
Parser |
getParser()
Deprecated. Parser class is deprecated, use instead getXMLReader() |
protected java.lang.Object |
getRecognizedXmlOrgProperty(java.lang.String name)
By default, we don't support the default properties... |
XMLReader |
getXMLReader()
Returns the XMLReader that is encapsulated by the
implementation of this class. |
void |
parse(InputSource is,
DefaultHandler dh)
Parse the content of the given InputStream instance as XML using the specified DefaultHandler. |
protected void |
processingInstruction(java.lang.String target,
java.lang.String data)
Match the SAX API |
void |
setContentHandler(ContentHandler contentHandler)
Allow an application to register a content event handler. |
void |
setDTDHandler(DTDHandler handler)
Allow an application to register a DTD event handler. |
void |
setEntityResolver(EntityResolver resolver)
Allow an application to register an entity resolver. |
void |
setErrorHandler(ErrorHandler errorHandler)
Allow an application to register an error event handler. |
protected void |
setLexicalHandler(java.lang.Object value)
|
protected void |
setRecognizedXmlOrgProperty(java.lang.String name,
java.lang.Object value)
By default, we don't support the default properties... |
protected void |
startCDATA()
Match the SAX2 API: Fire startCDATA event |
protected void |
startDocument()
Start parsing |
protected void |
startElement(java.lang.String qName,
java.lang.String namespace,
java.lang.String localName,
AttributesImpl attributes)
Match the SAX API |
protected void |
startPrefixMapping(java.lang.String prefix,
java.lang.String uri)
Starting prefix mapping |
protected void |
warning(java.lang.String errorMsg,
java.lang.String parameter)
A warning case was encountered. |
Methods inherited from class org.eclipse.ercp.xml.parser.AbstractSAXParserImpl |
---|
addAttribute, errorMsg, getCharDecoder, getColumnNumber, getCurrentState, getElementLocalName, getFeature, getLineNumber, getProperty, getPublicId, getSystemId, getWriteBufferAsString, isNamespaceAware, isValidating, parse, parse, parseNextCharacter, resetParser, setCharDecoder, setFeature, setNamespaceAware, setProperty |
Methods inherited from class javax.xml.parsers.SAXParser |
---|
parse, parse, parse, parse |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.xml.sax.XMLReader |
---|
getFeature, getProperty, parse, parse, setFeature, setProperty |
Constructor Detail |
---|
public SAXParserImpl()
Method Detail |
---|
protected void fatalError(java.lang.String errorMsg, java.lang.String parameter) throws SAXException
AbstractSAXParserImpl
fatalError
in class AbstractSAXParserImpl
SAXException
protected void warning(java.lang.String errorMsg, java.lang.String parameter) throws SAXException
AbstractSAXParserImpl
warning
in class AbstractSAXParserImpl
SAXException
protected boolean canDoStringInterning()
canDoStringInterning
in class AbstractSAXParserImpl
protected void endPrefixMapping(NSDeclaration nsDecl) throws SAXException
AbstractSAXParserImpl
endPrefixMapping
in class AbstractSAXParserImpl
SAXException
protected void startPrefixMapping(java.lang.String prefix, java.lang.String uri) throws SAXException
AbstractSAXParserImpl
startPrefixMapping
in class AbstractSAXParserImpl
SAXException
protected void characters(char[] ch, int start, int length) throws SAXException
AbstractSAXParserImpl
characters
in class AbstractSAXParserImpl
SAXException
protected void startElement(java.lang.String qName, java.lang.String namespace, java.lang.String localName, AttributesImpl attributes) throws SAXException
AbstractSAXParserImpl
startElement
in class AbstractSAXParserImpl
SAXException
protected void endElement(java.lang.String qName, java.lang.String namespace, java.lang.String localName) throws SAXException
AbstractSAXParserImpl
endElement
in class AbstractSAXParserImpl
SAXException
protected void processingInstruction(java.lang.String target, java.lang.String data) throws SAXException
AbstractSAXParserImpl
processingInstruction
in class AbstractSAXParserImpl
SAXException
protected void startDocument() throws SAXException
startDocument
in class AbstractSAXParserImpl
SAXException
protected void endDocument() throws SAXException
endDocument
in class AbstractSAXParserImpl
SAXException
public void parse(InputSource is, DefaultHandler dh) throws SAXException, java.io.IOException
parse
in class SAXParser
is
- - InputStream containing the content to be parsed.dh
- - The SAX DefaultHandler to use.
java.io.IOException
- - If any IO errors occur.
java.lang.IllegalArgumentException
- - If the given InputStream is null.
SAXException
- - If the underlying parser throws a SAXException while parsing.public XMLReader getXMLReader() throws SAXException
SAXParser
XMLReader
that is encapsulated by the
implementation of this class.
getXMLReader
in class SAXParser
SAXException
public Parser getParser() throws SAXException
getParser
in class SAXParser
SAXException
public void setContentHandler(ContentHandler contentHandler)
XMLReader
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
contentHandler
- The content handler.XMLReader.setContentHandler(ContentHandler)
public ContentHandler getContentHandler()
XMLReader
getContentHandler
in interface XMLReader
XMLReader.getContentHandler()
public void setErrorHandler(ErrorHandler errorHandler)
XMLReader
If the application does not register an error handler, all error events reported by the SAX parser will be silently ignored; however, normal processing may not continue. It is highly recommended that all SAX applications implement an error handler to avoid unexpected bugs.
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.
setErrorHandler
in interface XMLReader
errorHandler
- The error handler.XMLReader.setErrorHandler(ErrorHandler)
public ErrorHandler getErrorHandler()
XMLReader
getErrorHandler
in interface XMLReader
XMLReader.getErrorHandler()
public void setDTDHandler(DTDHandler handler)
XMLReader
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 XMLReader
handler
- The DTD handler.XMLReader.setDTDHandler(DTDHandler)
public DTDHandler getDTDHandler()
XMLReader
getDTDHandler
in interface XMLReader
XMLReader.getDTDHandler()
public void setEntityResolver(EntityResolver resolver)
XMLReader
If the application does not register an entity resolver, the XMLReader will perform its own default resolution.
Applications may register a new or different resolver in the middle of a parse, and the SAX parser must begin using the new resolver immediately.
setEntityResolver
in interface XMLReader
resolver
- The entity resolver.XMLReader.setEntityResolver(EntityResolver)
public EntityResolver getEntityResolver()
XMLReader
getEntityResolver
in interface XMLReader
XMLReader.getEntityResolver()
protected void setLexicalHandler(java.lang.Object value)
protected java.lang.Object getRecognizedXmlOrgProperty(java.lang.String name) throws SAXNotSupportedException
AbstractSAXParserImpl
getRecognizedXmlOrgProperty
in class AbstractSAXParserImpl
SAXNotSupportedException
protected void setRecognizedXmlOrgProperty(java.lang.String name, java.lang.Object value) throws SAXNotSupportedException
AbstractSAXParserImpl
setRecognizedXmlOrgProperty
in class AbstractSAXParserImpl
SAXNotSupportedException
protected java.lang.Object getLexicalHandler()
protected void startCDATA() throws SAXException
AbstractSAXParserImpl
startCDATA
in class AbstractSAXParserImpl
SAXException
protected void endCDATA() throws SAXException
AbstractSAXParserImpl
endCDATA
in class AbstractSAXParserImpl
SAXException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |