Anfang des Inhaltsbereichs

HintergrunddokumentationHintergrunddokumentation Interface if_ixml_node_collection  Dokument im Navigationsbaum lokalisieren

Objects implementing the iXMLNodeCollection interface are used to represent collections of nodes that can be accessed by index rather than name (see iXMLNamedNodeMap). Note that iXMLNodeCollection does not inherit from iXMLNodeList.

The difference between NamedNodeMaps and NodeCollections is the fact, that several nodes with the same name can be stored in an iXMLNodeCollection but not in an iXMLNamedNodeMap.

specializes

enumerations

methods

 

 

method append_item

This method appends the given node at the end of the node collection.

interface

if_ixml_node_collection

parameters

node

The node to append.

return value

Returns one of the following return codes:

ixml_mr_dom_ok = 0

The method succeeded.

ixml_mr_dom_invalid_arg = 0x00020003L

The given index is invalid.

abap signature

method append_item

importing

p_node type ref to if_ixml_node

returning

value(rval) type I.

 

 

method create_iterator

Creates a new node iterator which traverses this node collection from left to right (forward, index 0 to index iXMLNodeCollection::getLength()-1).

interface

if_ixml_node_collection

return value

Returns an interface pointer to the new iterator, or null if an error occured.

abap signature

method create_iterator

returning

value(rval) type ref to if_ixml_node_iterator.

 

 

method create_iterator_filtered

Creates a new node iterator which traverses this node collection from left to right (forward, index 0 to index iXMLNodeCollection::getLength()-1). The iterator only returns nodes in the collection that are accepted by the given node filter.

interface

if_ixml_node_collection

parameters

filter

The (optional) node filter to match the nodes against.

return value

Returns an interface pointer to the new iterator, or null if an error occured.

abap signature

method create_iterator_filtered

importing

filter type ref to if_ixml_node_filter

returning

value(rval) type ref to if_ixml_node_iterator.

 

 

method create_rev_iterator

Creates a new node reverse iterator which traverses this node collection from right to left (reverse, index iXMLNodeCollection::getLength()-1 to index 0).

interface

if_ixml_node_collection

return value

Returns an interface pointer to the new iterator, or null if an error occured.

abap signature

method create_rev_iterator

returning

value(rval) type ref to if_ixml_node_iterator.

 

 

method create_rev_iterator_filtered

Creates a new node reverse iterator which traverses this node collection from right to left (reverse, index iXMLNodeCollection::getLength()-1 to index 0). The iterator only returns nodes in the collection that are accepted by the given node filter.

interface

if_ixml_node_collection

parameters

filter

The (optional) node filter to match the nodes against.

return value

Returns an interface pointer to the new iterator, or null if an error occured.

abap signature

method create_rev_iterator_filtered

importing

filter type ref to if_ixml_node_filter

returning

value(rval) type ref to if_ixml_node_iterator.

 

 

method get_item

This method returns a pointer to the node with the given index from the iXMLNodeCollection. Indices range from 0 to iXMLNodeCollection::getLength()-1.

interface

if_ixml_node_collection

parameters

index

The index of the node to return.

return value

Returns a pointer to the specified node.

abap signature

method get_item

importing

index type I

returning

value(rval) type ref to if_ixml_node.

 

 

method get_length

Returns the number of nodes in this iXMLNodeCollection.

interface

if_ixml_node_collection

return value

Returns the number of nodes in this iXMLNodeCollection.

abap signature

method get_length

returning

value(rval) type I.

 

 

method insert_item

This method inserts the given node at the specified index. Indices range from 0 to iXMLNodeCollection::getLength(). If index equals iXMLNodeCollection::getLength(), the node is appended to the node collection.

interface

if_ixml_node_collection

parameters

index

The index where to insert the node (0..iXMLNodeCollection::getLength()).

node

The node to insert.

return value

Returns one of the following return codes:

ixml_mr_dom_ok = 0

The method succeeded.

ixml_mr_dom_invalid_arg = 0x00020003L

One or more of the given arguments were invalid (e.g. invalid index).

abap signature

method insert_item

importing

index type I

p_node type ref to if_ixml_node

returning

value(rval) type I.

 

 

method remove_item

This method removes the given node at the specified index from the node collection. Indices range from 0 to iXMLNodeCollection::getLength()-1.

interface

if_ixml_node_collection

parameters

index

The index identifying the node to remove from the node collection (0..iXMLNodeCollection::getLength()-1).

return value

Returns one of the following return codes:

ixml_mr_dom_ok = 0

The method succeeded.

ixml_mr_dom_invalid_arg = 0x00020003L

The given index is invalid.

abap signature

method remove_item

importing

index type I

returning

value(rval) type I.

 

 

method replace_item

This method replaces the entry identified by index with the given node. Indices range from 0 to NodeCollection::getLength(). If index equals iXMLNodeCollection::getLength(), the node is appended to the node collection, since there is no node to replace.

interface

if_ixml_node_collection

parameters

index

The index of the node to replace (0..iXMLNodeCollection::getLength()).

node

The node to replace the previous value with.

return value

Returns one of the following return codes:

ixml_mr_dom_ok = 0

The method succeeded.

ixml_mr_dom_invalid_arg = 0x00020003L

One or more of the given arguments were invalid (e.g. invalid index).

abap signature

method replace_item

importing

index type I

node type ref to if_ixml_node

returning

value(rval) type I.

 

 

method query_interface

Queries the specified interface.

interface

if_ixml_node_collection

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.