org.castor.xmlctf.xmldiff.xml.nodes
Class ParentNode

java.lang.Object
  extended by org.castor.xmlctf.xmldiff.xml.nodes.XMLNode
      extended by org.castor.xmlctf.xmldiff.xml.nodes.ParentNode
Direct Known Subclasses:
Element, Root

public abstract class ParentNode
extends XMLNode

The base object for both Element and RootNode. The children of a ParentNode can be any type of XMLNode.

Since:
Castor 1.1
Version:
$Revision: 0000 $ $Date: 2007-01-11 00:00:00 -0600 (Thu, 11 Jan 2007) $
Author:
Edward Kuns

Field Summary
 
Fields inherited from class org.castor.xmlctf.xmldiff.xml.nodes.XMLNode
ATTRIBUTE, ELEMENT, PROCESSING_INSTRUCTION, ROOT, TEXT
 
Method Summary
 void addChild(XMLNode node)
          Adds the given child node to this ParentNode.
 java.util.Iterator getChildIterator()
          Returns an Iterator over the list of child nodes.
 java.lang.String getStringValue()
          Returns the string value of this parent node.
 boolean hasChildNodes()
          Returns true if this node has any child nodes.
 
Methods inherited from class org.castor.xmlctf.xmldiff.xml.nodes.XMLNode
getLocalName, getNamespaceURI, getNamespaceURI, getNodeLocation, getNodeType, getParentNode, getRootNode, getXPath, setNamespace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getChildIterator

public java.util.Iterator getChildIterator()
Returns an Iterator over the list of child nodes.

Returns:
an Iterator over the list of child nodes.

hasChildNodes

public boolean hasChildNodes()
Returns true if this node has any child nodes.

Returns:
True if this node has any child nodes.

getStringValue

public java.lang.String getStringValue()
Returns the string value of this parent node. The string value is the concatenation of the string value of all child nodes.

Specified by:
getStringValue in class XMLNode
Returns:
The string value of the node

addChild

public void addChild(XMLNode node)
Adds the given child node to this ParentNode.

Parameters:
node - the child node to add


Copyright © 2011. All Rights Reserved.