Anfang des Inhaltsbereichs

HintergrunddokumentationHintergrunddokumentation Interface if_ixml_named_node_map  Dokument im Navigationsbaum lokalisieren

Objects implementing the iXMLNamedNodeMap interface are used to represent collections of nodes that can be accessed by name. Note that iXMLNamedNodeMap does not inherit from iXMLNodeList; iXMLNamedNodeMaps are not maintained in any particular order. Objects contained in an object implementing iXMLNamedNodeMap may also be accessed by an ordinal index, but this is simply to allow convenient enumeration of the contents of an iXMLNamedNodeMap, and does not imply that the DOM specifies an order to these nodes.

specializes

enumerations

methods

 

 

method create_iterator

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

interface

if_ixml_named_node_map

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 map from left to right (forward, index 0 to index iXMLNamedNodeMap::getLength()-1). The iterator only returns nodes in the list that are accepted by the given node filter.

interface

if_ixml_named_node_map

parameters

filter

The 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 map from right to left (reverse, index iXMLNamedNodeMap::getLength()-1 to index 0).

interface

if_ixml_named_node_map

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 map from right to left (reverse, index iXMLNamedNodeMap::getLength()-1 to index 0). The iterator only returns nodes in the list that are accepted by the given node filter.

interface

if_ixml_named_node_map

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 iXMLNamedNodeMap. Indices range from 0 to iXMLNamedNodeMap::getLength()-1.

interface

if_ixml_named_node_map

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 iXMLNamedNodeMap.

interface

if_ixml_named_node_map

return value

Returns the number of nodes in this iXMLNamedNodeMap.

abap signature

method get_length

returning

value(rval) type I.

 

 

method get_named_item

This method returns a pointer to the first node with the given name in this iXMLNamedNodeMap. If no node with the given name exists, null is returned.

deprecated

This method has been replaced by the method get_named_item_ns(). It is still supported for compatibility reasons, but we recommend to switch to the replacement method, since get_named_item() may not be supported any more in a future release.

interface

if_ixml_named_node_map

parameters

name

The name (local part) of the node for which to look.

namespace [ default '' ]

The namespace (prefix) of the node for which to look or null.

return value

Returns a pointer to the first node with the given qualified name.

abap signature

method get_named_item

importing

name type string

namespace type string default ''

returning

value(rval) type ref to if_ixml_node.

 

 

method get_named_item_ns

This method returns a pointer to the first node with the given name in this iXMLNamedNodeMap. If no node with the given name exists, null is returned.

interface

if_ixml_named_node_map

parameters

name

The name (local part) of the node for which to look.

uri [ default '' ]

The namespace URI of the node for which to look or null.

return value

Returns a pointer to the first node with the given qualified name.

abap signature

method get_named_item_ns

importing

name type string

uri type string default ''

returning

value(rval) type ref to if_ixml_node.

 

 

method remove_named_item

This method removed the first node with the given name from this iXMLNamedNodeMap and returns a pointer to the removed node.

deprecated

This method has been replaced by the method remove_named_item_ns(). It is still supported for compatibility reasons, but we recommend to switch to the replacement method, since remove_named_item() may not be supported any more in a future release.

interface

if_ixml_named_node_map

parameters

name

The name (local part) of the node which is to be removed from the iXMLNamedNodeMap.

namespace [ default '' ]

The namespace (prefix) of the node to be removed or null.

return value

Returns one of the following return codes:

ixml_mr_dom_ok = 0

The specified item has been removed.

ixml_mr_dom_invalid_arg = 0x00020003L

The given argument is invalid.

ixml_mr_dom_not_found = 0x0002000aL

An item with the given name could not be found.

abap signature

method remove_named_item

importing

name type string

namespace type string default ''

returning

value(rval) type I.

 

 

method remove_named_item_ns

This method removed the first node with the given name from this iXMLNamedNodeMap and returns a pointer to the removed node.

interface

if_ixml_named_node_map

parameters

name

The name (local part) of the node which is to be removed from the iXMLNamedNodeMap.

uri [ default '' ]

The namespace URI of the node to be removed or null.

return value

Returns one of the following return codes:

ixml_mr_dom_ok = 0

The specified item has been removed.

ixml_mr_dom_invalid_arg = 0x00020003L

The given argument is invalid.

ixml_mr_dom_not_found = 0x0002000aL

An item with the given name could not be found.

abap signature

method remove_named_item_ns

importing

name type string

uri type string default ''

returning

value(rval) type I.

 

 

method set_named_item

Add a node to an iXMLNamedNodeMap using the name and namespace of the node.

As the getName() method is used to derive the name which the node must be stored under, multiple nodes of certain types (those that have a "special" string value) cannot be stored as the names would clash. This is seen as preferable to allowing nodes to be aliased.

deprecated

This method has been replaced by the method set_named_item_ns(). It is still supported for compatibility reasons, but we recommend to switch to the replacement method, since set_named_item() may not be supported any more in a future release.

interface

if_ixml_named_node_map

parameters

node

The node to add to the iXMLNamedNodeMap.

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 argument is invalid.

abap signature

method set_named_item

importing

node type ref to if_ixml_node

returning

value(rval) type I.

 

 

method set_named_item_ns

Add a node to an iXMLNamedNodeMap using the name and namespace of the node.

As the getName() method is used to derive the name which the node must be stored under, multiple nodes of certain types (those that have a "special" string value) cannot be stored as the names would clash. This is seen as preferable to allowing nodes to be aliased.

interface

if_ixml_named_node_map

parameters

node

The node to add to the iXMLNamedNodeMap.

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 argument is invalid.

abap signature

method set_named_item_ns

importing

node type ref to if_ixml_node

returning

value(rval) type I.

 

 

method query_interface

Queries the specified interface.

interface

if_ixml_named_node_map

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.