|
FreeHEP API Version current |
|||||||||
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,
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(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(XMLReader reader)
Attach an XMLReader to this traverser. |
void |
startElement(String namespaceURI,
String localName,
String qName,
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(XMLReader reader)
public void startElement(String namespaceURI, String localName, String qName, Attributes attrs) throws SAXException
SAXException
public void endElement(String namespaceURI, String localName, String qName) throws SAXException
SAXException
protected void handleElementAttributes(Attributes atts) throws SAXException
SAXException
protected void handleEndElement(String name) throws SAXException
SAXException
protected void handleSubElement(SAXTraverser sub) throws SAXException
SAXException
protected SAXTraverser handleElement(String name, Attributes attrs) throws SAXException
this
to continue
using the current traverser.
SAXException
public boolean toBoolean(String value) throws BadXMLException
BadXMLException
public double toDouble(String value) throws SAXException
SAXException
public float toFloat(String value) throws SAXException
SAXException
public int toInt(String value) throws SAXException
SAXException
public short toShort(String value) throws SAXException
SAXException
public long toLong(String value) throws SAXException
SAXException
public byte toByte(String value) throws SAXException
SAXException
|
FreeHEP API Version current |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |