Superclass for JDOM objects which are allowed to contain
Content content.
See Also:org.jdom.Content See Also:org.jdom.Document See Also:org.jdom.Element author: Bradley S. Huffman author: Jason Hunter version: $Revision: 1.1 $, $Date: 2005/04/27 09:32:37 $
getDescendants(Filter filter) Returns an
java.util.Iterator that walks over all descendants
in document order applying the Filter to return only elements that
match the filter rule.
Returns the child at the given index.
Parameters: index - location of desired child child at the given index throws: IndexOutOfBoundsException - if index is negative or beyondthe current number of children throws: IllegalStateException - if parent is a Documentand the root element is not set
Returns the full content of this parent as a
java.util.List which contains objects of type
Content . The returned list is
"live" and in document order. Any modifications
to it affect the element's actual contents. Modifications are checked
for conformance to XML 1.0 rules.
Sequential traversal through the List is best done with an Iterator
since the underlying implement of
java.util.List.size may
require walking the entire list and indexed lookups may require
starting at the beginning each time.
a list of the content of the parent throws: IllegalStateException - if parent is a Documentand the root element is not set
Returns as a
java.util.List the content of
this parent that matches the supplied filter. The returned list is
"live" and in document order. Any modifications to it affect
the element's actual contents. Modifications are checked for
conformance to XML 1.0 rules.
Sequential traversal through the List is best done with an Iterator
since the underlying implement of
java.util.List.size may
require walking the entire list and indexed lookups may require
starting at the beginning each time.
Parameters: filter - filter to apply a list of the content of the parent matching the filter throws: IllegalStateException - if parent is a Documentand the root element is not set
Returns an
java.util.Iterator that walks over all descendants
in document order applying the Filter to return only elements that
match the filter rule. With filters you can match only Elements,
only Comments, Elements or Comments, only Elements with a given name
and/or prefix, and so on.
Parameters: filter - filter to select which descendants to see an iterator to walk descendants that match a filter
Return this parent's owning document or null if the branch containing
this parent is currently not attached to a document.
this child's owning document or null if none
Return this parent's parent, or null if this parent is currently
not attached to another parent. This is the same method as in Content but
also added to Parent to allow more easy up-the-tree walking.
this parent's parent or null if none
Returns the index of the supplied child in the content list,
or -1 if not a child of this parent.
Parameters: child - child to search for index of child, or -1 if not found
Removes from this parent all child content matching the given filter
and returns a list of the detached children.
Parameters: filter - filter to apply list of the detached children matching the filter
Removes and returns the child at the given
index, or returns null if there's no such child.
Parameters: index - index of child to remove detached child at given index or null if no throws: IndexOutOfBoundsException - if index is negative or beyondthe current number of children