|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xml.sax.helpers.DefaultHandler net.sourceforge.pavlov.library.BookXMLHandler
public final class BookXMLHandler
Implementation of Sax's DefaultHandler for Book XML files
ContentHandler
,
DefaultHandler
Constructor Summary | |
---|---|
BookXMLHandler()
|
Method Summary | |
---|---|
void |
characters(char[] ch,
int start,
int length)
Called when sax reads characters that are not start or end tags. |
void |
endDocument()
Called when sax ends reading the file. |
void |
endElement(String namespaceURI,
String localName,
String qName)
Called when an END tag is found. |
Book |
getBook()
Returns the loaded book. |
void |
startDocument()
Called when sax starts reading the file. |
void |
startElement(String namespaceURI,
String localName,
String qName,
Attributes attr)
Called when a start tag is found. |
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
---|
endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BookXMLHandler()
Method Detail |
---|
public void startDocument() throws SAXException
startDocument
in interface ContentHandler
startDocument
in class DefaultHandler
SAXException
- if an error occurspublic void endDocument() throws SAXException
endDocument
in interface ContentHandler
endDocument
in class DefaultHandler
SAXException
- if an error occurspublic void startElement(String namespaceURI, String localName, String qName, Attributes attr) throws SAXException
startElement
in interface ContentHandler
startElement
in class DefaultHandler
namespaceURI
- a String
valuelocalName
- a String
valueqName
- a String
valueattr
- an Attributes
value
SAXException
- if an error occurspublic void endElement(String namespaceURI, String localName, String qName) throws SAXException
endElement
in interface ContentHandler
endElement
in class DefaultHandler
namespaceURI
- a String
valuelocalName
- a String
valueqName
- a String
value
SAXException
- if an error occurspublic void characters(char[] ch, int start, int length) throws SAXException
characters
in interface ContentHandler
characters
in class DefaultHandler
ch
- a char[]
valuestart
- an int
valuelength
- an int
value
SAXException
- if an error occurspublic Book getBook()
Book
value
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |