class XMLConfiguration.XMLNode extends HierarchicalConfiguration.Node
Node
class that is connected with an XML
element. Changes on a node are also performed on the associated element.DefaultConfigurationNode.SubNodes
Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID
The serial version UID.
|
Constructor and Description |
---|
XMLConfiguration.XMLNode(java.lang.String name,
org.w3c.dom.Element elem)
Creates a new instance of
XMLNode and initializes it
with a name and the corresponding XML element. |
Modifier and Type | Method and Description |
---|---|
private org.w3c.dom.Text |
findTextNodeForUpdate()
Returns the only text node of this element for update.
|
protected void |
removeReference()
Updates the associated XML elements when a node is removed.
|
void |
setValue(java.lang.Object value)
Sets the value of this node.
|
private void |
updateAttribute()
Updates the node's value if it represents an attribute.
|
private void |
updateElement(java.lang.Object value)
Updates the node's value if it represents an element node.
|
addChild, getParent, hasChildren, remove, remove, setParent, visit
addAttribute, addChild, checkState, clone, createSubNodes, getAttribute, getAttributeCount, getAttributeCount, getAttributes, getAttributes, getChild, getChildren, getChildren, getChildrenCount, getChildrenCount, getName, getParentNode, getReference, getValue, isAttribute, isDefined, removeAttribute, removeAttribute, removeAttributes, removeChild, removeChild, removeChildren, setAttribute, setName, setParentNode, setReference, visit
private static final long serialVersionUID
public XMLConfiguration.XMLNode(java.lang.String name, org.w3c.dom.Element elem)
XMLNode
and initializes it
with a name and the corresponding XML element.name
- the node's nameelem
- the XML elementpublic void setValue(java.lang.Object value)
setValue
in interface ConfigurationNode
setValue
in class DefaultConfigurationNode
value
- the node's new valueprotected void removeReference()
removeReference
in class DefaultConfigurationNode
private void updateElement(java.lang.Object value)
value
- the new valueprivate void updateAttribute()
private org.w3c.dom.Text findTextNodeForUpdate()