Package de.pdark.decentxml
Interface Parent
- All Superinterfaces:
Node
- All Known Implementing Classes:
Document
,Element
,NodeWithChildren
This is an interface for anything which can be a parent:
Element
and Document
.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionaddNodes
(int index, Collection<? extends Node> nodes) addNodes
(Collection<? extends Node> nodes) Remove all nodesFind a child element (not a node!) by pathgetNode
(int index) Get a specific node from the listgetNodes()
Get the list of child nodes.boolean
hasNodes()
Does this node have children?int
The number of nodes in the listint
nodeIndexOf
(Node node) The index of the node in the node list or -1 if it isn't in the listremoveNode
(int index) Remove a node from the listboolean
removeNode
(Node node) Remove a node from the list
-
Method Details
-
addNode
-
addNode
-
addNodes
-
addNodes
-
addNodes
-
addNodes
-
getNode
Get a specific node from the list -
removeNode
Remove a node from the list- Returns:
- The removed node.
-
removeNode
Remove a node from the list- Returns:
- true, if the node is in the list
-
clearNodes
Parent clearNodes()Remove all nodes -
getNodes
Get the list of child nodes.CAUTION: Changes to this list will modify the actual data structure! So don't do this unless you know what you're doing!
-
nodeIndexOf
The index of the node in the node list or -1 if it isn't in the list -
nodeCount
int nodeCount()The number of nodes in the list -
hasNodes
boolean hasNodes()Does this node have children? -
getChild
Find a child element (not a node!) by path
-