|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ElementTraversal
The ElementTraversal
interface is a set of read-only attributes
which allow an author to easily navigate between elements in a document.
In conforming implementations of Element Traversal, all objects that
implement Element
must also implement the
ElementTraversal
interface. Four of the methods,
ElementTraversal.getFirstElementChild()
, ElementTraversal.getLastElementChild()
,
ElementTraversal.getPreviousElementSibling()
, and ElementTraversal.getNextElementSibling()
,
each return a live reference to another element with the defined
relationship to the current element, if the related element exists. The
fifth method, ElementTraversal.getChildElementCount()
, exposes the number of child
elements of an element, for preprocessing before navigation.
See also the Element Traversal Specification.
Method Summary | ||
---|---|---|
int |
getChildElementCount()
Returns the current number of element nodes that are children of this element. |
|
Element |
getFirstElementChild()
Returns the first child element node of this element. |
|
Element |
getLastElementChild()
Returns the last child element node of this element. |
|
Element |
getNextElementSibling()
Returns the next sibling element node of this element. |
|
Element |
getPreviousElementSibling()
Returns the previous sibling element node of this element. |
Method Detail |
---|
Element getFirstElementChild()
null
if this element has no child elements.
Element getLastElementChild()
null
if this element has no child elements.
Element getPreviousElementSibling()
null
if this element has no element sibling nodes that
come before this one in the document tree.
Element getNextElementSibling()
null
if this element has no element sibling nodes that
come after this one in the document tree.
int getChildElementCount()
0
if this element has no child nodes that are of
nodeType
1
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal