issrg.utils.xml
Class IterableChildList

java.lang.Object
  extended by issrg.utils.xml.IterableChildList
All Implemented Interfaces:
java.lang.Iterable<org.w3c.dom.Node>

public final class IterableChildList
extends java.lang.Object
implements java.lang.Iterable<org.w3c.dom.Node>

Class implementing the Iterable interface to allow using the foreach construct rather than the clumsy NodeList approach to iterate over the children of a particular node.

Author:
sfl

Constructor Summary
IterableChildList(org.w3c.dom.Node parent)
          Constructs an IterableChildList object.
 
Method Summary
 java.util.Iterator<org.w3c.dom.Node> iterator()
          Returns an Iterator object to allow iterating over the child nodes of the parent element given in the constructor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IterableChildList

public IterableChildList(org.w3c.dom.Node parent)
Constructs an IterableChildList object.

Parameters:
parent - the Node over whose children will be iterated.
Method Detail

iterator

public java.util.Iterator<org.w3c.dom.Node> iterator()
Returns an Iterator object to allow iterating over the child nodes of the parent element given in the constructor.

Specified by:
iterator in interface java.lang.Iterable<org.w3c.dom.Node>
Returns:
an Iterator object to iterate of the children of the parent node
See Also:
ChildIterator