Interface if_ixml_node_iterator
In several popular approaches to software design, iterators are considered a basic building block for building reusable software and software libraries. For instance, they are fundamental to the Design Patterns approach, STL, and the Java libraries. The main advantages of node iterators in the DOM are:
An iterator allows the nodes of a data structure to be returned sequentially. When an iterator is first created, calling getNext () returns the first node. When no more nodes are present, getNext () returns null. It is important to remember that DOM structures may change as a document is loaded - when getNext () finds no more nodes, it is still quite possible that further nodes may be added in the next instant. Since iterators do not know how to predict the future, there is no way to check whether further nodes may be added at any given time.
specializes
enumerations
methods
method get_filter
Gets the node filter currently set for this iterator.
interface
if_ixml_node_iterator
return value
Returns the node filter currently set or null if no one is currently set.
abap signature
method get_filter
returning
value(rval) type ref to if_ixml_node_filter.
method get_next
Moves this iterator to the next node in the set of nodes iterated over. If the iterator is initial (e.g. after calling iXMLNodeIterator::reset() or immediately after creation), this method returns the first node in the set of nodes.
interface
if_ixml_node_iterator
return value
Returns the next node in the set being iterated over, or null if there are no more members in that set.
abap signature
method get_next
returning
value(rval) type ref to if_ixml_node.
method reset
Resets the iterator to the same state as a new iterator would be if constructed by the same factory method with the same arguments as used to construct this iterator.
interface
if_ixml_node_iterator
abap signature
method reset.
method set_filter
Sets a node filter for this iterator, i.e. the iterator will only iterate over nodes which are accepted by the given filter. Node filters can e.g. be created via the iXMLNode::createFilter...() factory methods.
interface
if_ixml_node_iterator
parameters
filter
The filter to set for this iterator.
return value
Returns one of the following return codes:
ixml_mr_dom_ok = 0
The specified filter was set successfully.
ixml_mr_dom_invalid_arg = 0x00020003L
The given filter is invalid.
ixml_mr_dom_not_supported = 0x0002000bL
This iterator does not support filters.
abap signature
method set_filter
importing
filter type ref to if_ixml_node_filter
returning
value(rval) type I.
method query_interface
Queries the specified interface.
interface
if_ixml_node_iterator
parameters
iid
The interface ID of the interface to query.
return value
Returns a reference to the queried interface or null if no such interface is supported.
abap signature
method query_interface
importing
iid type I
returning
value(rval) type I.