A more polymorphic approach that uses objects and classes rather than integer type codes
Only optionally supported in J2ME environments????
Much simpler overall; only two methods hasNext()
and next()
.
next()
returns an XMLEvent
object.
package javax.xml.stream;
public interface XMLIterator {
public XMLEvent next() throws XMLStreamException;
public boolean hasNext() throws XMLStreamException;
}