org.apache.commons.configuration
Class XMLConfiguration.XMLNode

java.lang.Object
  extended byorg.apache.commons.configuration.HierarchicalConfiguration.Node
      extended byorg.apache.commons.configuration.XMLConfiguration.XMLNode
All Implemented Interfaces:
Cloneable, Serializable
Enclosing class:
XMLConfiguration

class XMLConfiguration.XMLNode
extends HierarchicalConfiguration.Node

A specialized Node class that is connected with an XML element. Changes on a node are also performed on the associated element.


Constructor Summary
XMLConfiguration.XMLNode(Element elem)
          Creates a new instance of XMLNode and initializes it with the corresponding XML element.
XMLConfiguration.XMLNode(String name, Element elem)
          Creates a new instance of XMLNode and initializes it with a name and the corresponding XML element.
 
Method Summary
protected  void removeReference()
          Updates the associated XML elements when a node is removed.
 void setValue(Object value)
          Sets the value of this node.
 
Methods inherited from class org.apache.commons.configuration.HierarchicalConfiguration.Node
addChild, clone, getChildren, getChildren, getName, getParent, getReference, getValue, remove, remove, removeChildren, setName, setParent, setReference, visit
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLConfiguration.XMLNode

public XMLConfiguration.XMLNode(Element elem)
Creates a new instance of XMLNode and initializes it with the corresponding XML element.

Parameters:
elem - the XML element

XMLConfiguration.XMLNode

public XMLConfiguration.XMLNode(String name,
                                Element elem)
Creates a new instance of XMLNode and initializes it with a name and the corresponding XML element.

Parameters:
name - the node's name
elem - the XML element
Method Detail

setValue

public void setValue(Object value)
Sets the value of this node. If this node is associated with an XML element, this element will be updated, too.

Overrides:
setValue in class HierarchicalConfiguration.Node
Parameters:
value - the node's new value

removeReference

protected void removeReference()
Updates the associated XML elements when a node is removed.

Overrides:
removeReference in class HierarchicalConfiguration.Node


Copyright © 2001-2005 The Apache Software Foundation. All Rights Reserved.