|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Navigator
A Navigator is a bridge between XPath and a document model.
| Field Summary | |
|---|---|
static int |
ATTRIBUTE
|
static int |
COMMENT
|
static int |
ELEMENT
|
static int |
NAMESPACE
|
static int |
PROCESSING_INSTRUCTION
|
static int |
ROOT
|
static int |
TEXT
|
| Method Summary | |
|---|---|
int |
attributeCount(Object node)
Return the number of attributes of the specified node. |
int |
childCount(Object node)
Return the number of children of the specified node. |
Object |
getAttribute(Object node,
int index)
Return the attribute of the specified node with the specified attribute index. |
Object |
getChild(Object node,
int index)
Return the child of the specified node with the specified child index. |
String |
getName(Object node)
Return the name of the specified node. |
Object |
getParent(Object node)
Return the parent of the specified node or null
if it does not have a parent. |
Object |
getRoot(Object node)
Return the root node of the document to which the specified node belongs. |
String |
getStringValue(Object node)
Return the value of the specified node as defined in the XPath specification. |
int |
getType(Object node)
Return the type of the node as specified in this interface. |
Object |
nextSibling(Object node)
Return the next sibling of the specified node or null
if it does not have a one. |
Object |
previousSibling(Object node)
Return the previous sibling of the specified node or null
if it does not have a one. |
| Field Detail |
|---|
static final int ROOT
static final int ELEMENT
static final int TEXT
static final int ATTRIBUTE
static final int NAMESPACE
static final int PROCESSING_INSTRUCTION
static final int COMMENT
| Method Detail |
|---|
Object getRoot(Object node)
throws XPathException
XPathException
Object getParent(Object node)
throws XPathException
null
if it does not have a parent.
XPathException
Object nextSibling(Object node)
throws XPathException
null
if it does not have a one.
XPathException
Object previousSibling(Object node)
throws XPathException
null
if it does not have a one.
XPathException
Object getChild(Object node,
int index)
throws XPathException
XPathException
int childCount(Object node)
throws XPathException
XPathException
Object getAttribute(Object node,
int index)
throws XPathException
XPathException
int attributeCount(Object node)
throws XPathException
XPathException
String getName(Object node)
throws XPathException
null.
For attribute nodes this is the name of the attribute.
XPathException
String getStringValue(Object node)
throws XPathException
XPathException
int getType(Object node)
throws XPathException
XPathException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||