Nodes
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static Node | Returns: the child ornull if there is no child with the
given namethe parent node node, String the child's name name)Iterate through the direct children of the given parent node and find the child with the given name |
| public static String | Returns: the attribute ornull if the attribute does not existthe node node, String the name of the attribute attrName)Gets an attribute value from a node |
| public static boolean | Returns: the attribute's value or the default valuethe node node, String the name of the attribute attrName, boolean an optional default value to return if the
attribute does not exist defaultValue)Gets an attribute value from a node and parses it to a boolean |
| public static Integer | Returns: the attribute's value or the default valuethe node node, String the name of the attribute attrName, Integer an optional default value to return if the
attribute does not exist defaultValue)Gets an attribute value from a node and parses it to an integer |
| NodeHelper | back to summary |
|---|---|
| public NodeHelper() | |
| findDirectChild | back to summary |
|---|---|
| public static Node findDirectChild(Node node, String name) Iterate through the direct children of the given parent node and find the child with the given name | |
| getAttrValue | back to summary |
|---|---|
| public static String getAttrValue(Node node, String attrName) Gets an attribute value from a node | |
| getAttrValueBool | back to summary |
|---|---|
| public static boolean getAttrValueBool(Node node, String attrName, boolean defaultValue) Gets an attribute value from a node and parses it to a boolean | |
| getAttrValueInt | back to summary |
|---|---|
| public static Integer getAttrValueInt(Node node, String attrName, Integer defaultValue) throws NumberFormatException Gets an attribute value from a node and parses it to an integer | |