This returns a
List of all the child elements nested directly (one level deep) within this element, as
Element objects. If this target element has no nested elements, an empty List is returned. The returned list is "live" in document order and changes to it affect the element's actual contents.
Sequential traversal through the List is best done with a Iterator since the underlying implement of List.size() may not be the most efficient.
No recursion is performed, so elements nested two levels deep would have to be obtained with:
Iterator itr = (currentElement.getChildren()).iterator();
Element oneLevelDeep = (Element)itr.next();
List twoLevelsDeep = oneLevelDeep.getChildren();
// Do something with these children
- list of child
Element objects for this element
Definition at line 1418 of file Element.java.
References content, and org::jdom::ContentList::getView().
Referenced by getChildren().