public interface InputNode extends Node
InputNode
object represents an iterator for the
elements within an element. This allows the input node object to
become a self contained iterator for an element and its children.
Each child taken from the input node object, is itself an input
node, and can be used to explore its sub elements without having
any affect on its outer elements.Modifier and Type | Method and Description |
---|---|
InputNode |
getAttribute(String name)
Provides an attribute from the element represented.
|
NodeMap<InputNode> |
getAttributes()
This returns a map of the attributes contained within the
element.
|
InputNode |
getNext()
This returns the next child element within this element if
one exists.
|
InputNode |
getNext(String name)
This returns the next child in this element if that child
has the name provided.
|
InputNode |
getParent()
This is used to acquire the
Node that is the
parent of this node. |
Position |
getPosition()
This provides the position of this node within the document.
|
String |
getPrefix()
This is used to acquire the namespace prefix for the node.
|
String |
getReference()
This allows the namespace reference URI to be determined.
|
Object |
getSource()
This is used to return the source object for this node.
|
boolean |
isElement()
This is used to determine if this node is an element.
|
boolean |
isEmpty()
This is used to determine if this input node is empty.
|
boolean |
isRoot()
This method is used to determine if this node is the root
node for the XML document.
|
void |
skip()
This method is used to skip all child elements from this
element.
|
boolean isRoot()
boolean isElement()
String getPrefix()
String getReference()
Position getPosition()
InputNode getAttribute(String name)
name
- this is the name of the attribute to retrieveNodeMap<InputNode> getAttributes()
InputNode getParent()
Node
that is the
parent of this node. This will return the node that is
the direct parent of this node and allows for siblings to
make use of nodes with their parents if required.Object getSource()
InputNode getNext() throws Exception
Exception
- thrown if there was a parse errorInputNode getNext(String name) throws Exception
name
- this is the name of the next child elementException
- thrown if there was a parse errorvoid skip() throws Exception
Exception
- thrown if there was a parse errorboolean isEmpty() throws Exception
Exception
- thrown if there was a parse error