|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.freehep.xml.util.XMLNodeTraverser
public abstract class XMLNodeTraverser
Utility class for traversing XML DOM trees. This is an abstract class that has methods which are called as different elements are located in a DOM tree. It is designed to be extended for each nore in a specific DOM tree, with its methods overriden to handle specific elements and attributes of the tree.
| Nested Class Summary | |
|---|---|
static class |
XMLNodeTraverser.BadXMLException
Deprecated. Exception to throw for any kind of problem during the node traversal |
| Constructor Summary | |
|---|---|
XMLNodeTraverser()
Deprecated. |
|
| Method Summary | |
|---|---|
String |
getAttributeValue(String name)
Deprecated. Convenience method to get the value of some attribute. |
protected void |
handleAttributeNode(Attr node,
String name,
String value)
Deprecated. Handle an element attribute. |
protected void |
handleElement(Element node,
String name)
Deprecated. Handle an Element subnode. |
protected void |
handleElementAttributes(NamedNodeMap nnm)
Deprecated. Called to handle the attributes associated with the element being traversed. |
protected void |
handleOtherNode(Node node,
String name)
Deprecated. Handle a node other than an Element or TextNode. |
protected void |
handleSubNode(Node node,
String name)
Deprecated. Called to handle a subnode of the node being traversed. |
protected void |
handleTextNode(Text node,
String name)
Deprecated. Handle a text node. |
boolean |
toBoolean(String value)
Deprecated. Utility routine to convert a String to a boolean |
double |
toDouble(String value)
Deprecated. Utility routine to convert a String to a double |
int |
toInt(String value)
Deprecated. Utility routine to convert a String to an int |
void |
traverse(Node node)
Deprecated. Traverse a node |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XMLNodeTraverser()
| Method Detail |
|---|
public void traverse(Node node)
throws XMLNodeTraverser.BadXMLException
node - The node to traverse
XMLNodeTraverser.BadXMLException
protected void handleSubNode(Node node,
String name)
throws XMLNodeTraverser.BadXMLException
node - The subnode being handledname - The name of the subnode
XMLNodeTraverser.BadXMLException
protected void handleElementAttributes(NamedNodeMap nnm)
throws XMLNodeTraverser.BadXMLException
nnm - The attrinbutes being handled
XMLNodeTraverser.BadXMLException
protected void handleElement(Element node,
String name)
throws XMLNodeTraverser.BadXMLException
node - The element being handledname - The name of the element
XMLNodeTraverser.BadXMLException
protected void handleTextNode(Text node,
String name)
throws XMLNodeTraverser.BadXMLException
XMLNodeTraverser.BadXMLException
protected void handleAttributeNode(Attr node,
String name,
String value)
throws XMLNodeTraverser.BadXMLException
node - The attribute being handledname - The name of the attributevalue - The value of the attribute
XMLNodeTraverser.BadXMLException
protected void handleOtherNode(Node node,
String name)
throws XMLNodeTraverser.BadXMLException
node - The node being handledname - The name of the node
XMLNodeTraverser.BadXMLException
public int toInt(String value)
throws XMLNodeTraverser.BadXMLException
XMLNodeTraverser.BadXMLExceptionpublic String getAttributeValue(String name)
public boolean toBoolean(String value)
throws XMLNodeTraverser.BadXMLException
XMLNodeTraverser.BadXMLException
public double toDouble(String value)
throws XMLNodeTraverser.BadXMLException
XMLNodeTraverser.BadXMLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||