org.xerial.util.bean.impl
Class XMLTreeNode

java.lang.Object
  extended by org.xerial.util.bean.impl.XMLTreeNode
All Implemented Interfaces:
TreeNode

public class XMLTreeNode
extends Object
implements TreeNode

TreeNode implementation for XML data

Author:
leo

Constructor Summary
XMLTreeNode()
           
XMLTreeNode(Element element)
           
XMLTreeNode(String nodeName, String nodeValue)
           
 
Method Summary
 void addChild(XMLTreeNode childNode)
           
 List<TreeNode> getChildren()
           
 String getNodeName()
           
 String getNodeValue()
           
static XMLTreeNode parse(XMLTreeNode currentNode, Element element)
          Parses the input DOM element, and constructs XMLTreeNode
 void setNodeName(String nodeName)
           
 void setNodeValue(String nodeValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLTreeNode

public XMLTreeNode()

XMLTreeNode

public XMLTreeNode(String nodeName,
                   String nodeValue)

XMLTreeNode

public XMLTreeNode(Element element)
Method Detail

parse

public static XMLTreeNode parse(XMLTreeNode currentNode,
                                Element element)
Parses the input DOM element, and constructs XMLTreeNode

Parameters:
currentNode - the current node matching the element
element - 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)


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