Constructor and Description |
---|
ElementIterator(Element parent)
Create a new instance of
ElementIterator with the given
parent element. |
ElementIterator(Element parent,
QName qname)
Create a new instance of
ElementIterator with the given
parent element. |
ElementIterator(Element parent,
String localName,
Namespace namespace)
Create a new instance of
ElementIterator with the given
parent element. |
public ElementIterator(Element parent, String localName, Namespace namespace)
ElementIterator
with the given
parent element. Only child elements that match the given local name
and namespace will be respected by hasNext()
and nextElement()
.parent
- localName
- local name the child elements must matchnamespace
- namespace the child elements must matchpublic ElementIterator(Element parent, QName qname)
ElementIterator
with the given
parent element. Only child elements that match the given QName
will be respected by hasNext()
and nextElement()
.parent
- qname
- name to match (exactly)public ElementIterator(Element parent)
ElementIterator
with the given
parent element. No filtering is applied to child elements that are
iterated.parent
- public void remove()
remove
in interface Iterator<Element>
UnsupportedOperationException
public boolean hasNext()
Element
public Element next()
next
in interface Iterator<Element>
Iterator.next()
,
nextElement()
public Element nextElement()
Element
in the iterator.NoSuchElementException
- if there is no next element.Copyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.