|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
it.unimo.dbgroup.momis.tools.BaseParserXml
Generic parser for XML files. This handles the levelTexts that collects the between the tags and provides the method endElement_getElementText
| Field Summary | |
private boolean |
_debug
if true enables some verbose output |
private int |
_level
current level (deepth in elementa) |
private java.util.Vector |
_levelTexts
Vector of StringBuffers where _text = _levelTexts.get(_level); |
protected java.io.PrintStream |
_logPrintStream
|
protected java.lang.StringBuffer |
_text
Collect text during the parsing |
| Constructor Summary | |
BaseParserXml()
Constructor |
|
BaseParserXml(java.io.PrintStream logPrintStream)
Constructor |
|
| Method Summary | |
void |
characters(char[] ch,
int start,
int length)
Receive notification of character data inside an element. |
java.lang.String |
endElement_getElementText()
To be used in endElement: Retrieve the text for the ended element |
void |
endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String rawName)
manages the text between elements |
void |
error(org.xml.sax.SAXParseException spe)
Error callback. |
void |
fatalError(org.xml.sax.SAXParseException spe)
Fatal error callback. |
boolean |
getDebug()
|
void |
setDebug(boolean debug)
|
void |
setLogPrintStream(java.io.PrintStream logPrintStream)
|
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String rawName,
org.xml.sax.Attributes atts)
manages the text between elements |
void |
warning(org.xml.sax.SAXParseException spe)
Warning callback. |
| Methods inherited from class org.xml.sax.helpers.DefaultHandler |
endDocument, endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.io.PrintStream _logPrintStream
private int _level
protected java.lang.StringBuffer _text
private java.util.Vector _levelTexts
private boolean _debug
| Constructor Detail |
public BaseParserXml()
public BaseParserXml(java.io.PrintStream logPrintStream)
logPrintStream - where write the output| Method Detail |
public void setLogPrintStream(java.io.PrintStream logPrintStream)
public void setDebug(boolean debug)
public boolean getDebug()
public void characters(char[] ch,
int start,
int length)
throws org.xml.sax.SAXException
org.xml.sax.SAXException
public void startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String rawName,
org.xml.sax.Attributes atts)
throws org.xml.sax.SAXException
org.xml.sax.SAXException
public void endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String rawName)
throws org.xml.sax.SAXException
org.xml.sax.SAXExceptionpublic java.lang.String endElement_getElementText()
public void warning(org.xml.sax.SAXParseException spe)
spe - The parse exception that caused the callback to be
invoked.public void error(org.xml.sax.SAXParseException spe)
spe - The parse exception that caused the callback to be
invoked.public void fatalError(org.xml.sax.SAXParseException spe)
spe - The parse exception that caused the callback to be
invoked.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||