DOM_NamedNodeMap - the Document Object Model (DOM) DOM_NamedNodeMap interface
#include <domc.h>
typedef struct {
int length;
/* other members */
} DOM_NamedNodeMap;
DOM_Node *DOM_NamedNodeMap_getNamedItem(DOM_NamedNodeMap *this, DOM_String *name);
DOM_Node *DOM_NamedNodeMap_setNamedItem(DOM_NamedNodeMap *this, DOM_Node *arg);
DOM_Node *DOM_NamedNodeMap_removeNamedItem(DOM_NamedNodeMap *this, DOM_String *name);
DOM_Node *DOM_NamedNodeMap_item(DOM_NamedNodeMap *this, int index);
The DOM_NamedNodeMap type provides access to an unordered map that
premits nodes to be retrieved and set by their nodeName. The
attributes member of a DOM_Element node type is a
DOM_NamedNodeMap as are the entities and notations
members of the DOM_DocumentType interface.
- getNamedItem
- The DOM_NamedNodeMap_getNamedItem function returns the node
associated with the name parameter or returnes NULL if there is no
node by that name in the map.
- setNamedItem
- The DOM_NamedNodeMap_setNamedItem function puts the node arg
into this map using it's nodeName member as key key. If a
node with the same name already exists in the map it will be replaced with
the new node and returned. If the replaced node will no longer be used it
must be freed with DOM_Document_destroyNode.
- removeNamedItem
- The DOM_NamedNodeMap_removeNamedItem function removes and returns
the named item from this map or returns NULL if there is no node by
that name in the map.
The DOM specifications require that attributes with default
DTD values should be replaced by their default value when the attribute
is removed. Currently DOMC does not support default DTD values.
- item
- The DOM_NamedNodeMap_item function returns the node in this
list at index which starts from 0.
- setNamedItem
- If the new DOM_Node replaces an existing node the replaced node is
returned. Otherwise NULL is returned.
- item
- The node at the specified index or NULL if there is no such node.