XMLParserItf Interface CATIDOMNamedNodeMap

Usage: an implementation of this interface is supplied and you must use it as is. You should not reimplement it.


interface CATIDOMNamedNodeMap

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

objects in the DOM are live.


Method Index


o GetLength(int&)
Retrieves the number of nodes in this map.
o GetNamedItem(CATUnicodeString&,CATIDOMNode_var&)
Retrieves a node specified by name.
o GetNamedItemNS(CATUnicodeString&,CATUnicodeString&,CATIDOMNode_var&)
Retrieves a node specified by local name and namespace URI.
o Item(int,CATIDOMNode_var&)
Retrieves the indexth item in the map.
o RemoveNamedItem(CATUnicodeString&,CATIDOMNode_var&)
Removes a node specified by name.
o RemoveNamedItemNS(CATUnicodeString&,CATUnicodeString&,CATIDOMNode_var&)
Removes a node specified by local name and namespace URI.
o SetNamedItem(CATIDOMNode_var&,CATIDOMNode_var&)
Adds a node using its nodeName attribute.
o SetNamedItemNS(CATIDOMNode_var&,CATIDOMNode_var&)
Adds a node using its namespace URI and local name.

Methods


o GetLength
public virtual GetLength( oLength)
Retrieves the number of nodes in this map. The range of valid child node indices is 0 to oLength - 1 inclusive.
Parameters:
oLength
The retrieved number of nodes in this map.
o GetNamedItem
public virtual GetNamedItem( const iName,
oNamedItem)
Retrieves a node specified by name.
Parameters:
iName
The name of a node to retrieve.
oNamedItem
A
(of any type) with the specified name, or NULL_var if it does not identify any node in this map.
See also:
,
o GetNamedItemNS
public virtual GetNamedItemNS( const iNamespaceURI,
const iLocalName,
oItem)
Retrieves a node specified by local name and namespace URI.
Parameters:
iNamespaceURI
The namespace URI of the node to retrieve. When it is an empty string, this method behaves like
.
iLocalName
The local name of the node to retrieve.
oItem
A
(of any type) with the specified name, or NULL_var if the specified name did not identify any node in the map.
See also:
o Item
public virtual Item( iIndex,
oItem)
Retrieves the indexth item in the map. If index is greater than or equal to the number of nodes in this map, this returns NULL_var.
Parameters:
iIndex
Index into this map.
oItem
The node at the indexth position in the map, or NULL_var if that is not a valid index.
See also:
o RemoveNamedItem
public virtual RemoveNamedItem( const iName,
oNamedItem)
Removes a node specified by name. When this map contains the attributes attached to an element, if the removed attribute is known to have a default value, an attribute immediately appears containing the default value as well as the corresponding namespace URI, local name, and prefix when applicable.
Parameters:
iName
The name of the node to remove.
oNamedItem
The node removed from this map if a node with such a name exists.
Errors Returned:
Error Class Error Id Description
XMLParserERR_2208 NOT_FOUND_ERR: Raised if there is no node named iName in this map.
XMLParserERR_2207 NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
See also:
,
o RemoveNamedItemNS
public virtual RemoveNamedItemNS( const iNamespaceURI,
const iLocalName,
oRemovedNode)
Removes a node specified by local name and namespace URI. A removed attribute may be known to have a default value when this map contains the attributes attached to an element, as returned by the attributes attribute of the interface. If so, an attribute immediately appears containing the default value as well as the corresponding namespace URI, local name, and prefix when applicable.
Parameters:
iNamespaceURI
The namespace URI of the node to remove.
iLocalName
The local name of the node to remove.
oRemovedNode
The node removed from this map if a node with such a local name and namespace URI exists.
Errors Returned:
Error Class Error Id Description
XMLParserERR_2208 NOT_FOUND_ERR: Raised if there is no node named iNamespaceURI and iLocalName in this map.
XMLParserERR_2207 NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
See also:
, ,
o SetNamedItem
public virtual SetNamedItem( const iNodeToStore,
oOldNode)
Adds a node using its nodeName attribute. If a node with that name is already present in this map, it is replaced by the new one.
As the nodeName attribute 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.
Parameters:
iNodeToStore
The node to store in this map. The node will later be accessible using the return value of its
method.
oOldNode
If the new
replaces an existing node, oOldNode is set to the replaced , otherwise it is set to NULL_var.
Errors Returned:
Error Class Error Id Description
XMLParserERR_2204 WRONG_DOCUMENT_ERR: Raised if iNodeToStore was created from a different document than the one that created this map.
XMLParserERR_2207 NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
XMLParserERR_2210 INUSE_ATTRIBUTE_ERR: Raised if iNodeToStore is an that is already an attribute of another object. The DOM user must explicitly clone nodes to re-use them in other elements.
See also:
o SetNamedItemNS
public virtual SetNamedItemNS( const iNamedItemNS,
oOldNode)
Adds a node using its namespace URI and local name. If a node with that namespace URI and that local name is already present in this map, it is replaced by the new one.
Parameters:
iNamedItemNS
The node to store in this map. The node will later be accessible using the return value of its
and methods.
oOldNode
If the new
replaces an existing node, oOldNode is set to the replaced , otherwise to NULL_var.
Errors Returned:
Error Class Error Id Description
XMLParserERR_2204 WRONG_DOCUMENT_ERR: Raised if iNamedItemNS was created from a different document than the one that created this map.
XMLParserERR_2207 NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
XMLParserERR_2210 INUSE_ATTRIBUTE_ERR: Raised if iNodeToStore is a that is already an attribute of another object. The DOM user must explicitly clone nodes to re-use them in other elements.
See also:
, ,

This object is included in the file: CATIDOMNamedNodeMap.h
If needed, your Imakefile.mk should include the module: CatXmlItfExt

Copyright © 1999-2014, Dassault Systèmes. All rights reserved.