libdom
|
#include <assert.h>
#include <stdlib.h>
#include <dom/core/element.h>
#include <dom/core/node.h>
#include <dom/core/string.h>
#include "core/document.h"
#include "core/element.h"
#include "core/namednodemap.h"
#include "core/node.h"
#include "utils/utils.h"
Classes | |
struct | dom_namednodemap |
dom_exception _dom_namednodemap_create | ( | dom_document * | doc, |
void * | priv, | ||
struct nnm_operation * | opt, | ||
dom_namednodemap ** | map ) |
Create a namednodemap
doc | The owning document |
priv | The private data of this dom_namednodemap |
opt | The operation function pointer |
map | Pointer to location to receive created map |
::head must be a node owned by ::doc and must be either an Element or DocumentType node.
If ::head is of type Element, ::type must be DOM_ATTRIBUTE_NODE If ::head is of type DocumentType, ::type may be either DOM_ENTITY_NODE or DOM_NOTATION_NODE.
The returned map will already be referenced, so the client need not explicitly reference it. The client must unref the map once it is finished with it.
bool _dom_namednodemap_equal | ( | dom_namednodemap * | m1, |
dom_namednodemap * | m2 ) |
Compare whether two NamedNodeMap are equal.
dom_exception _dom_namednodemap_get_named_item | ( | dom_namednodemap * | map, |
dom_string * | name, | ||
dom_node ** | node ) |
Retrieve an item by name from a named node map
map | The map to retrieve the item from |
name | The name of the item to retrieve |
node | Pointer to location to receive item |
The returned node will have had its reference count increased. The client should unref the node once it has finished with it.
dom_exception _dom_namednodemap_get_named_item_ns | ( | dom_namednodemap * | map, |
dom_string * | namespace, | ||
dom_string * | localname, | ||
dom_node ** | node ) |
Retrieve an item by namespace/localname from a named node map
map | The map to retrieve the item from |
namespace | The namespace URI of the item to retrieve |
localname | The local name of the node to retrieve |
node | Pointer to location to receive item |
The returned node will have had its reference count increased. The client should unref the node once it has finished with it.
dom_exception _dom_namednodemap_item | ( | dom_namednodemap * | map, |
dom_ulong | index, | ||
dom_node ** | node ) |
Retrieve an item from a named node map
map | The map to retrieve the item from |
index | The map index to retrieve |
node | Pointer to location to receive item |
::index is a zero-based index into ::map. ::index lies in the range [0, length-1]
The returned node will have had its reference count increased. The client should unref the node once it has finished with it.
dom_exception _dom_namednodemap_remove_named_item | ( | dom_namednodemap * | map, |
dom_string * | name, | ||
dom_node ** | node ) |
Remove an item by name from a named node map
map | The map to remove from |
name | The name of the item to remove |
node | Pointer to location to receive removed item |
The returned node will have had its reference count increased. The client should unref the node once it has finished with it.
dom_exception _dom_namednodemap_remove_named_item_ns | ( | dom_namednodemap * | map, |
dom_string * | namespace, | ||
dom_string * | localname, | ||
dom_node ** | node ) |
Remove an item by namespace/localname from a named node map
map | The map to remove from |
namespace | The namespace URI of the item to remove |
localname | The local name of the item to remove |
node | Pointer to location to receive removed item |
The returned node will have had its reference count increased. The client should unref the node once it has finished with it.
dom_exception _dom_namednodemap_set_named_item | ( | dom_namednodemap * | map, |
dom_node * | arg, | ||
dom_node ** | node ) |
Add a node to a named node map, replacing any matching existing node
map | The map to add to |
arg | The node to add |
node | Pointer to location to receive replaced node |
::arg's nodeName attribute will be used to store it in ::map. It will be accessible using the nodeName attribute as the key for lookup.
Replacing a node by itself has no effect.
The returned node will have had its reference count increased. The client should unref the node once it has finished with it.
dom_exception _dom_namednodemap_set_named_item_ns | ( | dom_namednodemap * | map, |
dom_node * | arg, | ||
dom_node ** | node ) |
Add a node to a named node map, replacing any matching existing node
map | The map to add to |
arg | The node to add |
node | Pointer to location to receive replaced node |
::arg's namespaceURI and localName attributes will be used to store it in ::map. It will be accessible using the namespaceURI and localName attributes as the keys for lookup.
Replacing a node by itself has no effect.
The returned node will have had its reference count increased. The client should unref the node once it has finished with it.
void _dom_namednodemap_update | ( | dom_namednodemap * | map, |
void * | priv ) |
Update the dom_namednodemap to make it as a proxy of another object
map | The dom_namednodemap |
priv | The private data to change to |
dom_exception dom_namednodemap_get_length | ( | dom_namednodemap * | map, |
dom_ulong * | length ) |
Retrieve the length of a named node map
map | Map to retrieve length of |
length | Pointer to location to receive length |
void dom_namednodemap_ref | ( | dom_namednodemap * | map | ) |
Claim a reference on a DOM named node map
map | The map to claim a reference on |
void dom_namednodemap_unref | ( | dom_namednodemap * | map | ) |
Release a reference on a DOM named node map
map | The map to release the reference from |
If the reference count reaches zero, any memory claimed by the map will be released