|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectelectric.xml.NodeList
NodeList is a doubly-linked list of Nodes, and includes methods for adding, replacing and removing nodes.
| Field Summary | |
Node |
first
|
Node |
last
|
| Constructor Summary | |
NodeList()
|
|
| Method Summary | |
void |
addSiblingNode(Node node,
Node newNode)
Append the new node as a sibling of the existing node. |
void |
append(Node node)
Append the specified node to the end of this list. |
void |
clear()
Remove all the nodes. |
int |
getLength()
Return the number of nodes in the list. |
org.w3c.dom.Node |
getNamedItem(java.lang.String name)
Return the node with the specified name, or null if not found |
org.w3c.dom.Node |
getNamedItemNS(java.lang.String namespaceURI,
java.lang.String localName)
Retrieves a node specified by local name and namespace URI. |
void |
insert(Node node)
Insert the specified node at the beginning of this list. |
void |
insertSiblingNode(Node node,
Node newNode)
Insert the new node as a sibling of the existing node. |
boolean |
isEmpty()
Return true if this list is empty. |
org.w3c.dom.Node |
item(int index)
Return the indexth item in the collection. |
void |
remove(Node node)
Remove the specified node from this list. |
org.w3c.dom.Node |
removeNamedItem(java.lang.String name)
Removes a node specified by name. |
org.w3c.dom.Node |
removeNamedItemNS(java.lang.String namespaceURI,
java.lang.String localName)
Removes a node specified by local name and namespace URI. |
void |
replace(Node oldNode,
Node newNode)
Replace the old node with the new node in this list. |
org.w3c.dom.Node |
setNamedItem(org.w3c.dom.Node node)
Adds a node using its nodeName attribute. |
org.w3c.dom.Node |
setNamedItemNS(org.w3c.dom.Node node)
Adds a node using its namespaceURI and localName. |
int |
size()
Return the number of nodes in this list. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public Node first
public Node last
| Constructor Detail |
public NodeList()
| Method Detail |
public boolean isEmpty()
public void append(Node node)
node - The node to append.public void insert(Node node)
node - The node to insert.public void remove(Node node)
node - The node to remove.
public void replace(Node oldNode,
Node newNode)
oldNode - The node to replace.newNode - The new node.
public void addSiblingNode(Node node,
Node newNode)
node - The existing node.newNode - The new node.
public void insertSiblingNode(Node node,
Node newNode)
node - The existing node.newNode - The new node.public int size()
public void clear()
public int getLength()
getLength in interface org.w3c.dom.NodeListpublic org.w3c.dom.Node item(int index)
item in interface org.w3c.dom.NodeListindex - The index of the node to return.public org.w3c.dom.Node getNamedItem(java.lang.String name)
getNamedItem in interface org.w3c.dom.NamedNodeMapname - The name of the node to return.public org.w3c.dom.Node setNamedItem(org.w3c.dom.Node node)
setNamedItem in interface org.w3c.dom.NamedNodeMapnode - The node to be added.public org.w3c.dom.Node removeNamedItem(java.lang.String name)
removeNamedItem in interface org.w3c.dom.NamedNodeMapname - The name of the node to remove.
public org.w3c.dom.Node getNamedItemNS(java.lang.String namespaceURI,
java.lang.String localName)
getNamedItemNS in interface org.w3c.dom.NamedNodeMapnamespaceURI - The namespace URI.localName - The local name.public org.w3c.dom.Node setNamedItemNS(org.w3c.dom.Node node)
setNamedItemNS in interface org.w3c.dom.NamedNodeMapnode - The node to add.
public org.w3c.dom.Node removeNamedItemNS(java.lang.String namespaceURI,
java.lang.String localName)
removeNamedItemNS in interface org.w3c.dom.NamedNodeMapnamespaceURI - The namespace URI.localName - The local name.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||