org.xerial.util.bean.impl
Class XMLTreeNode
java.lang.Object
org.xerial.util.bean.impl.XMLTreeNode
- All Implemented Interfaces:
- TreeNode
public class XMLTreeNode
- extends Object
- implements TreeNode
TreeNode implementation for XML data
- Author:
- leo
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XMLTreeNode
public XMLTreeNode()
XMLTreeNode
public XMLTreeNode(String nodeName,
String nodeValue)
XMLTreeNode
public XMLTreeNode(Element element)
parse
public static XMLTreeNode parse(XMLTreeNode currentNode,
Element element)
- Parses the input DOM element, and constructs XMLTreeNode
- Parameters:
currentNode - the current node matching the elementelement - the parsing target element
- Returns:
- the currentNode with its descendant XMLTreeNodes
setNodeValue
public void setNodeValue(String nodeValue)
getChildren
public List<TreeNode> getChildren()
- Specified by:
getChildren in interface TreeNode
getNodeName
public String getNodeName()
- Specified by:
getNodeName in interface TreeNode
getNodeValue
public String getNodeValue()
- Specified by:
getNodeValue in interface TreeNode
setNodeName
public void setNodeName(String nodeName)
addChild
public void addChild(XMLTreeNode childNode)

This work is licensed under a Creative Commons Attribution-ShareAlike 2.1 Japan License.