protected class XmlParser.MyHandler extends Object implements ContentHandler
| Constructor and Description |
|---|
MyHandler(int type,
String criteria)
Constructor defining actions taken during parsing.
|
| Modifier and Type | Method and Description |
|---|---|
void |
characters(char[] text,
int start,
int length)
This method is called when text is encountered between start
and end tags.
|
void |
endDocument()
Called by the parser when the end of the document
is encountered.
|
void |
endElement(String namespaceURI,
String localName,
String qualifiedName)
Called when an end tag is encountered.
|
void |
endPrefixMapping(String prefix)
Called when prefix mapping is ended.
|
void |
ignorableWhitespace(char[] text,
int start,
int length)
Called when ignorable whitespace is encountered.
|
void |
processingInstruction(String target,
String data) |
void |
setDocumentLocator(Locator locator) |
void |
skippedEntity(String name) |
void |
startDocument()
Called by the parser when the start of the document
is encountered.
|
void |
startElement(String namespaceURI,
String localName,
String qualifiedName,
Attributes atts)
Called when a start tag is encountered.
|
void |
startPrefixMapping(String prefix,
String uri)
Called when prefix mapping is started.
|
public void setDocumentLocator(Locator locator)
setDocumentLocator in interface ContentHandlerpublic void startDocument() throws SAXException
Initializes fields used in parsing document.
startDocument in interface ContentHandlerSAXExceptionpublic void endDocument() throws SAXException
endDocument in interface ContentHandlerSAXExceptionpublic void startPrefixMapping(String prefix, String uri) throws SAXException
No action is taken for this parser action.
startPrefixMapping in interface ContentHandlerSAXExceptionpublic void endPrefixMapping(String prefix) throws SAXException
No action is taken for this parser action.
endPrefixMapping in interface ContentHandlerSAXExceptionpublic void startElement(String namespaceURI, String localName, String qualifiedName, Attributes atts) throws SAXException
Together with the actions taken in response to the endElement method, this represents the heart of the parsing operation.
startElement in interface ContentHandlerSAXExceptionpublic void endElement(String namespaceURI, String localName, String qualifiedName) throws SAXException
endElement in interface ContentHandlerSAXExceptionpublic void characters(char[] text, int start, int length) throws SAXException
Multiple calls of this method may be executed to handle the text between the tags.
characters in interface ContentHandlerSAXExceptionpublic void ignorableWhitespace(char[] text, int start, int length) throws SAXException
Ignorable whitespace is ignored and no action is taken.
ignorableWhitespace in interface ContentHandlerSAXExceptionpublic void processingInstruction(String target, String data) throws SAXException
processingInstruction in interface ContentHandlerSAXExceptionpublic void skippedEntity(String name) throws SAXException
skippedEntity in interface ContentHandlerSAXExceptionCopyright © 2017. All rights reserved.