|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
org.davesag.generica.util.xml.AbstractXmlParser
The AbstractXmlParser is an abstract root class for the other
XMLParsers used in Generica.
| Nested Class Summary |
| Nested classes inherited from class org.davesag.generica.util.xml.XmlParser |
XmlParser.Factory |
| Field Summary | |
protected StringBuffer |
theContent
the text buffer of text between the start and end tags |
protected Object |
theCurrentItem
the current item being worked on |
protected List |
theList
the list of objects |
protected org.apache.xerces.parsers.SAXParser |
theParser
the sax parser |
| Constructor Summary | |
protected |
AbstractXmlParser()
default constructor |
| Method Summary | |
protected void |
add(Object o)
add to the list of parsed objects. |
void |
characters(char[] text,
int start,
int length)
This method is called when CDATA elements are found. |
protected String |
getBuffer()
get the buffer as a trimmed string. |
protected Object |
getCurrentItem()
gets the current object |
List |
getList()
gets the list of parsed objects. |
protected org.apache.xerces.parsers.SAXParser |
getParser()
gets the current parser |
void |
parse(InputSource xml)
parses the input source provided. |
void |
parse(String xmlfile)
parses the file name provided. |
void |
parseString(String s)
parses the string provided. |
protected void |
resetBuffer()
resets the buffer |
protected void |
setCurrentItem(Object o)
sets the current object |
void |
setParser(org.apache.xerces.parsers.SAXParser parser)
set the parser to get calls from |
| Methods inherited from class org.xml.sax.helpers.DefaultHandler |
endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl, warning |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected org.apache.xerces.parsers.SAXParser theParser
protected List theList
protected StringBuffer theContent
protected Object theCurrentItem
| Constructor Detail |
protected AbstractXmlParser()
| Method Detail |
public void setParser(org.apache.xerces.parsers.SAXParser parser)
setParser in interface XmlParserparser - the parserprotected org.apache.xerces.parsers.SAXParser getParser()
public List getList()
getList in interface XmlParserprotected void add(Object o)
o - The object to clone and add to the list.protected void setCurrentItem(Object o)
o - The curren object.protected Object getCurrentItem()
protected void resetBuffer()
protected String getBuffer()
public void parseString(String s)
parseString in interface XmlParsers - The string to parsepublic void parse(InputSource xml)
parse in interface XmlParserxml - the input source to parsepublic void parse(String xmlfile)
parse in interface XmlParserxmlfile - the name of the file to parse
public void characters(char[] text,
int start,
int length)
CDATA elements are found. It
trims and adds the chars to the internal buffer.
characters in interface ContentHandlertext - The array of charsstart - The start countlength - The length.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||