|
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 ContentHandlersetDocumentLocator in class DefaultHandler
public void startDocument()
throws SAXException
Receive notification of the beginning of a document.
startDocument in interface ContentHandlerstartDocument in class DefaultHandlerSAXException
public void endDocument()
throws SAXException
Receive notification of the end of a document.
endDocument in interface ContentHandlerendDocument in class DefaultHandlerSAXException
public void startPrefixMapping(String prefix,
String uri)
throws SAXException
Begin the scope of a prefix-URI Namespace mapping.
startPrefixMapping in interface ContentHandlerstartPrefixMapping in class DefaultHandlerSAXException
public void endPrefixMapping(String prefix)
throws SAXException
End the scope of a prefix-URI mapping.
endPrefixMapping in interface ContentHandlerendPrefixMapping in class DefaultHandlerSAXException
public void startElement(String namespaceURI,
String localName,
String qName,
Attributes saxAttributes)
throws SAXException
Receive notification of the beginning of an element.
startElement in interface ContentHandlerstartElement in class DefaultHandlerSAXException
public void endElement(String namespaceURI,
String localName,
String qName)
throws SAXException
Receive notification of the end of an element.
endElement in interface ContentHandlerendElement in class DefaultHandlerSAXException
public void characters(char[] ch,
int start,
int length)
throws SAXException
Receive notification of character data.
characters in interface ContentHandlercharacters in class DefaultHandlerSAXException
public void ignorableWhitespace(char[] ch,
int start,
int length)
throws SAXException
Receive notification of ignorable whitespace in element content.
ignorableWhitespace in interface ContentHandlerignorableWhitespace in class DefaultHandlerSAXException
public void processingInstruction(String target,
String data)
throws SAXException
Receive notification of a processing instruction.
processingInstruction in interface ContentHandlerprocessingInstruction in class DefaultHandlerSAXException
public void skippedEntity(String name)
throws SAXException
Receive notification of a skipped entity.
skippedEntity in interface ContentHandlerskippedEntity in class DefaultHandlerSAXException
public void notationDecl(String name,
String publicId,
String systemId)
throws SAXException
Receive notification of a notation declaration event.
notationDecl in interface DTDHandlernotationDecl in class DefaultHandlerSAXException
public void unparsedEntityDecl(String name,
String publicId,
String systemId,
String notationName)
throws SAXException
Receive notification of an unparsed entity declaration event.
unparsedEntityDecl in interface DTDHandlerunparsedEntityDecl in class DefaultHandlerSAXException
public void elementDecl(String name,
String model)
throws SAXException
Report an element type declaration.
elementDecl in interface DeclHandlerelementDecl in class DefaultHandler2SAXException
public void attributeDecl(String eName,
String aName,
String type,
String valueDefault,
String value)
throws SAXException
Report an attribute type declaration.
attributeDecl in interface DeclHandlerattributeDecl in class DefaultHandler2SAXException
public void internalEntityDecl(String name,
String value)
throws SAXException
Report an internal entity declaration.
internalEntityDecl in interface DeclHandlerinternalEntityDecl in class DefaultHandler2SAXException
public void externalEntityDecl(String name,
String publicId,
String systemId)
throws SAXException
Report a parsed external entity declaration.
externalEntityDecl in interface DeclHandlerexternalEntityDecl in class DefaultHandler2SAXException
public InputSource getExternalSubset(String name,
String baseURI)
throws SAXException
getExternalSubset in interface EntityResolver2getExternalSubset in class DefaultHandler2SAXException
public InputSource resolveEntity(String name,
String publicId,
String baseURI,
String systemId)
throws SAXException
resolveEntity in interface EntityResolver2resolveEntity in class DefaultHandler2SAXException
public void warning(SAXParseException exception)
throws SAXException
Receive notification of a warning.
warning in interface ErrorHandlerwarning in class DefaultHandlerSAXException
public void error(SAXParseException exception)
throws SAXException
Receive notification of a recoverable error.
error in interface ErrorHandlererror in class DefaultHandlerSAXException
public void fatalError(SAXParseException exception)
throws SAXException
Receive notification of a non-recoverable error.
fatalError in interface ErrorHandlerfatalError in class DefaultHandlerSAXException
public void startDTD(String name,
String publicId,
String systemId)
throws SAXException
Report the start of DTD declarations, if any.
startDTD in interface LexicalHandlerstartDTD in class DefaultHandler2SAXException
public void endDTD()
throws SAXException
Report the end of DTD declarations.
endDTD in interface LexicalHandlerendDTD in class DefaultHandler2SAXException
public void startEntity(String name)
throws SAXException
Report the start of an entity.
startEntity in interface LexicalHandlerstartEntity in class DefaultHandler2SAXException
public void endEntity(String name)
throws SAXException
Report the end of an entity.
endEntity in interface LexicalHandlerendEntity in class DefaultHandler2SAXException
public void startCDATA()
throws SAXException
Report the start of a CDATA section.
startCDATA in interface LexicalHandlerstartCDATA in class DefaultHandler2SAXException
public void endCDATA()
throws SAXException
Report the end of a CDATA section.
endCDATA in interface LexicalHandlerendCDATA in class DefaultHandler2SAXException
public void comment(char[] ch,
int start,
int length)
throws SAXException
Report an XML comment anywhere in the document.
comment in interface LexicalHandlercomment in class DefaultHandler2SAXExceptionpublic SAXAdapter.ParserDelegate getParserDelegate()
|
GXPARSE download | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||