Gdome2 Reference Manual | |||
---|---|---|---|
<<< Previous Page | Home | Up | Next Page >>> |
Objects implementing the GdomeNamedNodeMap interface are used to represent collections of nodes that can be accessed by name. Note that GdomeNamedNodeMap does not inherit from GdomeNodeList; GdomeNamedNodeMap are not maintained in any particular order. Objects contained in an object implementing GdomeNamedNodeMap may also be accessed by an ordinal index, but this is simply to allow convenient enumeration of the contents of a GdomeNamedNodeMap, and does not imply that the DOM specifies an order to these Nodes.
GdomeNamedNodeMap objects in the DOM are live.
void gdome_nnm_ref (GdomeNamedNodeMap *self, GdomeException *exc); |
Increase the reference count of the specified NamedNodeMap.
void gdome_nnm_unref (GdomeNamedNodeMap *self, GdomeException *exc); |
Decrease the reference count of the specified NamedNodeMap. Free the NamedNodeMap structure if the specified NamedNodeMap will have zero reference.
|
GdomeNode* gdome_nnm_getNamedItem (GdomeNamedNodeMap *self, GdomeDOMString *name, GdomeException *exc); |
Retrieves a node specified by name.
GdomeNode* gdome_nnm_setNamedItem (GdomeNamedNodeMap *self, GdomeNode *arg, GdomeException *exc); |
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.
GDOME_WRONG_DOCUMENT_ERR: Raised if arg was created from a different document than the one that created this map. GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly. GDOME_INUSE_ATTRIBUTE_ERR: Raised if arg is an Attr that is already an attribute of another Element object. The DOM user must explicitly clone Attr nodes to re-use them in other elements.
self : | NamedNodeMap Objects ref |
arg : | a node to store in this map. |
exc : | Exception Object ref |
Returns : | if the new Node replaces an existing node, the replaced Node is returned, otherwise NULL is returned. GDOME_HIERARCHY_REQUEST_ERR: Raised if an attempt is made to add a node doesn't belong in this NamedNodeMap. Examples would include trying to insert something other than an Attr node into an Element's map of attributes, or a non-Entity node into the DocumentType's map of Entities. |
GdomeNode* gdome_nnm_removeNamedItem (GdomeNamedNodeMap *self, GdomeDOMString *name, GdomeException *exc); |
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.
GDOME_NOT_FOUND_ERR: Raised if there is no node named name in this map. GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
GdomeNode* gdome_nnm_item (GdomeNamedNodeMap *self, |
GdomeNode* gdome_nnm_getNamedItemNS (GdomeNamedNodeMap *self, GdomeDOMString *namespaceURI, GdomeDOMString *localName, GdomeException *exc); |
Retrieves a node specified by local name and namespace URI.
GdomeNode* gdome_nnm_setNamedItemNS (GdomeNamedNodeMap *self, GdomeNode *arg, GdomeException *exc); |
Adds a node using its namespaceURI and localName. If a node with that namespace URI and that local name is already present in this map, it is replaced by the new one
GDOME_WRONG_DOCUMENT_ERR: Raised if arg was created from a different document than the one that created this map. GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly. GDOME_INUSE_ATTRIBUTE_ERR: Raised if arg is an Attr that is already an attribute of another Element object. The DOM user must explicitly clone Attr nodes to re-use them in other elements.
self : | NamedNodeMap Objects ref |
arg : | a node to store in this map. The node will later be accessible using the value of its namespaceURI and localName attributes. |
exc : | Exception Object ref |
Returns : | If the new Node replaces an existing node the replaced Node is returned, otherwise null is returned. GDOME_HIERARCHY_REQUEST_ERR: Raised if an attempt is made to add a node doesn't belong in this NamedNodeMap. Examples would include trying to insert something other than an Attr node into an Element's map of attributes, or a non-Entity node into the DocumentType's map of Entities. |
GdomeNode* gdome_nnm_removeNamedItemNS (GdomeNamedNodeMap *self, GdomeDOMString *namespaceURI, GdomeDOMString *localName, GdomeException *exc); |
Removes a node specified by local name and namespace URI. 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.
GDOME_NOT_FOUND_ERR: Raised if there is no node named name in this map. GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.