|
FreeHEP API Version v1.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.xml.sax.helpers.DefaultHandler | +--org.freehep.xml.util.SAXTraverser
A utility for working with SAX parsers. A heirarchy of SAXTraversers can be used to maintain state while parsing an XML file.
Constructor Summary | |
SAXTraverser()
|
Method Summary | |
void |
endElement(String namespaceURI,
String localName,
String qName)
|
protected SAXTraverser |
handleElement(String name,
org.xml.sax.Attributes attrs)
Override this to handle the start of new sub elements Return the SAXTraverser to be used for the sub node, or this to continue
using the current traverser. |
protected void |
handleElementAttributes(org.xml.sax.Attributes atts)
Override to handle node attributes |
protected void |
handleEndElement(String name)
Override this to handle the end of an element |
protected void |
handleSubElement(SAXTraverser sub)
Override this to be notified of sub nodes of the current node |
void |
setReader(org.xml.sax.XMLReader reader)
Attach an XMLReader to this traverser. |
void |
startElement(String namespaceURI,
String localName,
String qName,
org.xml.sax.Attributes attrs)
|
boolean |
toBoolean(String value)
Utility routine to convert a String to a boolean |
byte |
toByte(String value)
Utility routine to convert a String to a byte |
double |
toDouble(String value)
Utility routine to convert a String to a double |
float |
toFloat(String value)
Utility routine to convert a String to a float |
int |
toInt(String value)
Utility routine to convert a String to an int |
long |
toLong(String value)
Utility routine to convert a String to a long |
short |
toShort(String value)
Utility routine to convert a String to a short |
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
characters, endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SAXTraverser()
Method Detail |
public void setReader(org.xml.sax.XMLReader reader)
public void startElement(String namespaceURI, String localName, String qName, org.xml.sax.Attributes attrs) throws org.xml.sax.SAXException
startElement
in interface org.xml.sax.ContentHandler
startElement
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
public void endElement(String namespaceURI, String localName, String qName) throws org.xml.sax.SAXException
endElement
in interface org.xml.sax.ContentHandler
endElement
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
protected void handleElementAttributes(org.xml.sax.Attributes atts) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected void handleEndElement(String name) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected void handleSubElement(SAXTraverser sub) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected SAXTraverser handleElement(String name, org.xml.sax.Attributes attrs) throws org.xml.sax.SAXException
this
to continue
using the current traverser.
org.xml.sax.SAXException
public boolean toBoolean(String value) throws BadXMLException
BadXMLException
public double toDouble(String value) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public float toFloat(String value) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public int toInt(String value) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public short toShort(String value) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public long toLong(String value) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public byte toByte(String value) throws org.xml.sax.SAXException
org.xml.sax.SAXException
|
FreeHEP API Version v1.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |