|
GXPARSE hosted by |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
org.xml.sax.ext.DefaultHandler2
ca.gorman.xml.parse.sax.SAXAdapter<T>
public class SAXAdapter<T extends Parser>
Bridge between SAX parser API
and
XML stream parser API
. Acts as a listener to
org.xml.sax.XMLReader
.
Nested Class Summary | |
---|---|
class |
SAXAdapter.ParserDelegate
Provides delegates for some of the methods in Parser . |
Constructor Summary | |
---|---|
SAXAdapter(Coroutine coroutine,
Listener<T> listener,
T parser)
Construct a SAXAdapter. |
Method Summary | |
---|---|
void |
attributeDecl(String eName,
String aName,
String type,
String valueDefault,
String value)
Report an attribute type declaration. |
void |
characters(char[] ch,
int start,
int length)
Receive notification of character data. |
void |
comment(char[] ch,
int start,
int length)
Report an XML comment anywhere in the document. |
void |
elementDecl(String name,
String model)
Report an element type declaration. |
void |
endCDATA()
Report the end of a CDATA section. |
void |
endDocument()
Receive notification of the end of a document. |
void |
endDTD()
Report the end of DTD declarations. |
void |
endElement(String namespaceURI,
String localName,
String qName)
Receive notification of the end of an element. |
void |
endEntity(String name)
Report the end of an entity. |
void |
endPrefixMapping(String prefix)
End the scope of a prefix-URI mapping. |
void |
error(SAXParseException exception)
Receive notification of a recoverable error. |
void |
externalEntityDecl(String name,
String publicId,
String systemId)
Report a parsed external entity declaration. |
void |
fatalError(SAXParseException exception)
Receive notification of a non-recoverable error. |
InputSource |
getExternalSubset(String name,
String baseURI)
|
Listener<T> |
getListener()
Get Listener. |
SAXAdapter.ParserDelegate |
getParserDelegate()
Get delegates for some of the methods
in Parser . |
void |
ignorableWhitespace(char[] ch,
int start,
int length)
Receive notification of ignorable whitespace in element content. |
void |
internalEntityDecl(String name,
String value)
Report an internal entity declaration. |
void |
notationDecl(String name,
String publicId,
String systemId)
Receive notification of a notation declaration event. |
void |
processingInstruction(String target,
String data)
Receive notification of a processing instruction. |
InputSource |
resolveEntity(String name,
String publicId,
String baseURI,
String systemId)
|
void |
setDocumentLocator(Locator locator)
Receive an object for locating the origin of SAX document events. |
void |
setListener(Listener<T> listener)
Install listener. |
void |
setParser(T parser)
Set or reset the Parser instance. |
void |
skippedEntity(String name)
Receive notification of a skipped entity. |
void |
startCDATA()
Report the start of a CDATA section. |
void |
startDocument()
Receive notification of the beginning of a document. |
void |
startDTD(String name,
String publicId,
String systemId)
Report the start of DTD declarations, if any. |
void |
startElement(String namespaceURI,
String localName,
String qName,
Attributes saxAttributes)
Receive notification of the beginning of an element. |
void |
startEntity(String name)
Report the start of an entity. |
void |
startPrefixMapping(String prefix,
String uri)
Begin the scope of a prefix-URI Namespace mapping. |
void |
unparsedEntityDecl(String name,
String publicId,
String systemId,
String notationName)
Receive notification of an unparsed entity declaration event. |
void |
warning(SAXParseException exception)
Receive notification of a warning. |
Methods inherited from class org.xml.sax.ext.DefaultHandler2 |
---|
resolveEntity |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SAXAdapter(Coroutine coroutine, Listener<T> listener, T parser)
Construct a SAXAdapter.
NullPointerException
- if any parameter is null.Method Detail |
---|
public void setListener(Listener<T> listener)
Install listener.
NullPointerException
- if listener is null.public Listener<T> getListener()
Get Listener.
public void setParser(T parser)
Set or reset the Parser
instance.
NullPointerException
- if parameter is nullpublic void setDocumentLocator(Locator locator)
Receive an object for locating the origin of SAX document events.
setDocumentLocator
in interface ContentHandler
setDocumentLocator
in class DefaultHandler
public void startDocument() throws SAXException
Receive notification of the beginning of a document.
startDocument
in interface ContentHandler
startDocument
in class DefaultHandler
SAXException
public void endDocument() throws SAXException
Receive notification of the end of a document.
endDocument
in interface ContentHandler
endDocument
in class DefaultHandler
SAXException
public void startPrefixMapping(String prefix, String uri) throws SAXException
Begin the scope of a prefix-URI Namespace mapping.
startPrefixMapping
in interface ContentHandler
startPrefixMapping
in class DefaultHandler
SAXException
public void endPrefixMapping(String prefix) throws SAXException
End the scope of a prefix-URI mapping.
endPrefixMapping
in interface ContentHandler
endPrefixMapping
in class DefaultHandler
SAXException
public void startElement(String namespaceURI, String localName, String qName, Attributes saxAttributes) throws SAXException
Receive notification of the beginning of an element.
startElement
in interface ContentHandler
startElement
in class DefaultHandler
SAXException
public void endElement(String namespaceURI, String localName, String qName) throws SAXException
Receive notification of the end of an element.
endElement
in interface ContentHandler
endElement
in class DefaultHandler
SAXException
public void characters(char[] ch, int start, int length) throws SAXException
Receive notification of character data.
characters
in interface ContentHandler
characters
in class DefaultHandler
SAXException
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException
Receive notification of ignorable whitespace in element content.
ignorableWhitespace
in interface ContentHandler
ignorableWhitespace
in class DefaultHandler
SAXException
public void processingInstruction(String target, String data) throws SAXException
Receive notification of a processing instruction.
processingInstruction
in interface ContentHandler
processingInstruction
in class DefaultHandler
SAXException
public void skippedEntity(String name) throws SAXException
Receive notification of a skipped entity.
skippedEntity
in interface ContentHandler
skippedEntity
in class DefaultHandler
SAXException
public void notationDecl(String name, String publicId, String systemId) throws SAXException
Receive notification of a notation declaration event.
notationDecl
in interface DTDHandler
notationDecl
in class DefaultHandler
SAXException
public void unparsedEntityDecl(String name, String publicId, String systemId, String notationName) throws SAXException
Receive notification of an unparsed entity declaration event.
unparsedEntityDecl
in interface DTDHandler
unparsedEntityDecl
in class DefaultHandler
SAXException
public void elementDecl(String name, String model) throws SAXException
Report an element type declaration.
elementDecl
in interface DeclHandler
elementDecl
in class DefaultHandler2
SAXException
public void attributeDecl(String eName, String aName, String type, String valueDefault, String value) throws SAXException
Report an attribute type declaration.
attributeDecl
in interface DeclHandler
attributeDecl
in class DefaultHandler2
SAXException
public void internalEntityDecl(String name, String value) throws SAXException
Report an internal entity declaration.
internalEntityDecl
in interface DeclHandler
internalEntityDecl
in class DefaultHandler2
SAXException
public void externalEntityDecl(String name, String publicId, String systemId) throws SAXException
Report a parsed external entity declaration.
externalEntityDecl
in interface DeclHandler
externalEntityDecl
in class DefaultHandler2
SAXException
public InputSource getExternalSubset(String name, String baseURI) throws SAXException
getExternalSubset
in interface EntityResolver2
getExternalSubset
in class DefaultHandler2
SAXException
public InputSource resolveEntity(String name, String publicId, String baseURI, String systemId) throws SAXException
resolveEntity
in interface EntityResolver2
resolveEntity
in class DefaultHandler2
SAXException
public void warning(SAXParseException exception) throws SAXException
Receive notification of a warning.
warning
in interface ErrorHandler
warning
in class DefaultHandler
SAXException
public void error(SAXParseException exception) throws SAXException
Receive notification of a recoverable error.
error
in interface ErrorHandler
error
in class DefaultHandler
SAXException
public void fatalError(SAXParseException exception) throws SAXException
Receive notification of a non-recoverable error.
fatalError
in interface ErrorHandler
fatalError
in class DefaultHandler
SAXException
public void startDTD(String name, String publicId, String systemId) throws SAXException
Report the start of DTD declarations, if any.
startDTD
in interface LexicalHandler
startDTD
in class DefaultHandler2
SAXException
public void endDTD() throws SAXException
Report the end of DTD declarations.
endDTD
in interface LexicalHandler
endDTD
in class DefaultHandler2
SAXException
public void startEntity(String name) throws SAXException
Report the start of an entity.
startEntity
in interface LexicalHandler
startEntity
in class DefaultHandler2
SAXException
public void endEntity(String name) throws SAXException
Report the end of an entity.
endEntity
in interface LexicalHandler
endEntity
in class DefaultHandler2
SAXException
public void startCDATA() throws SAXException
Report the start of a CDATA section.
startCDATA
in interface LexicalHandler
startCDATA
in class DefaultHandler2
SAXException
public void endCDATA() throws SAXException
Report the end of a CDATA section.
endCDATA
in interface LexicalHandler
endCDATA
in class DefaultHandler2
SAXException
public void comment(char[] ch, int start, int length) throws SAXException
Report an XML comment anywhere in the document.
comment
in interface LexicalHandler
comment
in class DefaultHandler2
SAXException
public SAXAdapter.ParserDelegate getParserDelegate()
|
GXPARSE download | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |