public class NodeImpl extends net.n3.nanoxml.XMLElement implements Node
| Constructor and Description |
|---|
NodeImpl()
Create a new instance of NodeImpl.
|
NodeImpl(java.lang.String nodeName)
Create a new instance of NodeImpl.
|
NodeImpl(java.lang.String fullName,
java.lang.String namespace)
Creates a new instance of NodeImpl.
|
NodeImpl(java.lang.String fullName,
java.lang.String systemID,
int lineNr)
Creates a new instance of ElementImpl.
|
NodeImpl(java.lang.String fullName,
java.lang.String namespace,
java.lang.String systemID,
int lineNr)
Creates a new instance of NodeImpl.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addChild(Node childNode)
Add a child node to this node.
|
void |
addContent(int position,
Node childNode)
Add the child node to this node at the specified position.
|
void |
addContent(Node childNode)
Add the child node to this node.
|
java.lang.Object |
clone()
Return a deep copy of this node, including copies of all sub-nodes.
|
Node |
detach()
Detach this node from its parent node.
|
Element |
getChild(java.lang.String nodeName)
Get the first child node with the specified name.
|
java.util.Vector<Node> |
getChildren()
Get the child nodes of this node.
|
int |
getChildrenCount()
Get the number of child nodes.
|
java.lang.String |
getValue()
Get the node value.
|
boolean |
hasChildren()
Return true if this node has child nodes.
|
boolean |
removeChild(java.lang.String nodeName)
Remove the first child node with the specified name.
|
void |
setValue(java.lang.String theValue)
Set the node value.
|
addChild, createElement, createElement, createElement, createElement, createPCDataElement, enumerateAttributeNames, enumerateChildren, equals, equalsXMLElement, finalize, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttributeCount, getAttributeNamespace, getAttributes, getAttributesInNamespace, getAttributeType, getAttributeType, getChildAtIndex, getChildrenNamed, getChildrenNamed, getContent, getFirstChildNamed, getFirstChildNamed, getFullName, getLineNr, getName, getNamespace, getParent, getSystemID, hasAttribute, hasAttribute, insertChild, isLeaf, removeAttribute, removeAttribute, removeChild, removeChildAtIndex, setAttribute, setAttribute, setContent, setName, setNamepublic NodeImpl()
public NodeImpl(java.lang.String nodeName)
nodeName - the node name.public NodeImpl(java.lang.String fullName,
java.lang.String namespace)
fullName - the full name of the elementnamespace - the namespace symbol.public NodeImpl(java.lang.String fullName,
java.lang.String systemID,
int lineNr)
fullName - the full name of the elementsystemID - the system ID of the XML data where the element starts.lineNr - the line in the XML data where the element starts.public NodeImpl(java.lang.String fullName,
java.lang.String namespace,
java.lang.String systemID,
int lineNr)
fullName - the full name of the elementnamespace - the namespace URI.systemID - the system ID of the XML data where the element starts.lineNr - the line in the XML data where the element starts.public void setValue(java.lang.String theValue)
public java.lang.String getValue()
public boolean hasChildren()
hasChildren in interface net.n3.nanoxml.IXMLElementhasChildren in interface NodehasChildren in class net.n3.nanoxml.XMLElementpublic int getChildrenCount()
getChildrenCount in interface net.n3.nanoxml.IXMLElementgetChildrenCount in interface NodegetChildrenCount in class net.n3.nanoxml.XMLElementpublic void addChild(Node childNode)
public Element getChild(java.lang.String nodeName)
public java.util.Vector<Node> getChildren()
getChildren in interface net.n3.nanoxml.IXMLElementgetChildren in interface NodegetChildren in class net.n3.nanoxml.XMLElementpublic boolean removeChild(java.lang.String nodeName)
removeChild in interface NodenodeName - the name of the node to remove.public void addContent(Node childNode)
addContent in interface NodechildNode - the node to add as a child node.public void addContent(int position,
Node childNode)
addContent in interface Nodeposition - the position at which to add the child node.childNode - the node to add as a child node.public Node detach()