#include <dom/core/characterdata.h>
#include "core/node.h"
Go to the source code of this file.
|
dom_characterdata * | _dom_characterdata_create (void) |
|
dom_exception | _dom_characterdata_initialise (struct dom_characterdata *cdata, struct dom_document *doc, dom_node_type type, dom_string *name, dom_string *value) |
|
void | _dom_characterdata_finalise (struct dom_characterdata *cdata) |
|
dom_exception | _dom_characterdata_get_data (struct dom_characterdata *cdata, dom_string **data) |
|
dom_exception | _dom_characterdata_set_data (struct dom_characterdata *cdata, dom_string *data) |
|
dom_exception | _dom_characterdata_get_length (struct dom_characterdata *cdata, uint32_t *length) |
|
dom_exception | _dom_characterdata_substring_data (struct dom_characterdata *cdata, uint32_t offset, uint32_t count, dom_string **data) |
|
dom_exception | _dom_characterdata_append_data (struct dom_characterdata *cdata, dom_string *data) |
|
dom_exception | _dom_characterdata_insert_data (struct dom_characterdata *cdata, uint32_t offset, dom_string *data) |
|
dom_exception | _dom_characterdata_delete_data (struct dom_characterdata *cdata, uint32_t offset, uint32_t count) |
|
dom_exception | _dom_characterdata_replace_data (struct dom_characterdata *cdata, uint32_t offset, uint32_t count, dom_string *data) |
|
dom_exception | _dom_characterdata_get_text_content (dom_node_internal *node, dom_string **result) |
|
dom_exception | _dom_characterdata_set_text_content (dom_node_internal *node, dom_string *content) |
|
void | _dom_characterdata_destroy (dom_node_internal *node) |
|
dom_exception | _dom_characterdata_copy (dom_node_internal *old, dom_node_internal **copy) |
|
dom_exception | _dom_characterdata_copy_internal (dom_characterdata *old, dom_characterdata *new) |
|
◆ dom_characterdata_copy_internal
#define dom_characterdata_copy_internal |
( |
| o, |
|
|
| n ) |
Value:
dom_exception _dom_characterdata_copy_internal(dom_characterdata *old, dom_characterdata *new)
Definition characterdata.c:508
Definition characterdata.h:18
◆ DOM_CHARACTERDATA_PROTECT_VTABLE
#define DOM_CHARACTERDATA_PROTECT_VTABLE |
Value:
void _dom_characterdata_destroy(dom_node_internal *node)
Definition characterdata.c:480
dom_exception _dom_characterdata_copy(dom_node_internal *old, dom_node_internal **copy)
Definition characterdata.c:487
◆ DOM_CHARACTERDATA_VTABLE
#define DOM_CHARACTERDATA_VTABLE |
Value:
dom_exception _dom_characterdata_insert_data(struct dom_characterdata *cdata, uint32_t offset, dom_string *data)
Definition characterdata.c:277
dom_exception _dom_characterdata_get_length(struct dom_characterdata *cdata, uint32_t *length)
Definition characterdata.c:161
dom_exception _dom_characterdata_get_data(struct dom_characterdata *cdata, dom_string **data)
Definition characterdata.c:99
dom_exception _dom_characterdata_set_data(struct dom_characterdata *cdata, dom_string *data)
Definition characterdata.c:124
dom_exception _dom_characterdata_append_data(struct dom_characterdata *cdata, dom_string *data)
Definition characterdata.c:228
dom_exception _dom_characterdata_delete_data(struct dom_characterdata *cdata, uint32_t offset, uint32_t count)
Definition characterdata.c:339
dom_exception _dom_characterdata_replace_data(struct dom_characterdata *cdata, uint32_t offset, uint32_t count, dom_string *data)
Definition characterdata.c:408
dom_exception _dom_characterdata_substring_data(struct dom_characterdata *cdata, uint32_t offset, uint32_t count, dom_string **data)
Definition characterdata.c:194
◆ DOM_NODE_VTABLE_CHARACTERDATA
#define DOM_NODE_VTABLE_CHARACTERDATA |
◆ _dom_characterdata_append_data()
Append data to the end of a character data node's content
- Parameters
-
cdata | The node to append data to |
data | The data to append |
- Returns
- DOM_NO_ERR on success, DOM_NO_MODIFICATION_ALLOWED_ERR if
cdata
is readonly.
◆ _dom_characterdata_copy()
◆ _dom_characterdata_copy_internal()
◆ _dom_characterdata_create()
◆ _dom_characterdata_delete_data()
Delete data from a character data node's content
- Parameters
-
cdata | The node to delete from |
offset | The character offset to start deletion from |
count | The number of characters to delete |
- Returns
- DOM_NO_ERR on success, DOM_INDEX_SIZE_ERR if
offset
is negative or greater than the number of characters in cdata
or count
is negative, DOM_NO_MODIFICATION_ALLOWED_ERR if cdata
is readonly.
◆ _dom_characterdata_destroy()
◆ _dom_characterdata_finalise()
Finalise a character data node
- Parameters
-
cdata | The node to finalise |
The contents of cdata
will be cleaned up. cdata
will not be freed.
◆ _dom_characterdata_get_data()
Retrieve data from a character data node
- Parameters
-
cdata | Character data node to retrieve data from |
data | Pointer to location to receive data |
- Returns
- DOM_NO_ERR.
The returned string will have its reference count increased. It is the responsibility of the caller to unref the string once it has finished with it.
DOM3Core states that this can raise DOMSTRING_SIZE_ERR. It will not in this implementation; dom_strings are unbounded.
◆ _dom_characterdata_get_length()
Get the length (in characters) of a character data node's content
- Parameters
-
cdata | Node to read content length of |
length | Pointer to location to receive character length of content |
- Returns
- DOM_NO_ERR.
◆ _dom_characterdata_get_text_content()
◆ _dom_characterdata_initialise()
Initialise a character data node
- Parameters
-
cdata | The character data node to initialise |
doc | The document which owns the node |
type | The node type required |
name | The node name, or NULL |
value | The node value, or NULL |
- Returns
- DOM_NO_ERR on success.
doc
, name
and value
will have their reference counts increased.
◆ _dom_characterdata_insert_data()
Insert data into a character data node's content
- Parameters
-
cdata | The node to insert into |
offset | The character offset to insert at |
data | The data to insert |
- Returns
- DOM_NO_ERR on success, DOM_INDEX_SIZE_ERR if
offset
is negative or greater than the number of characters in cdata
, DOM_NO_MODIFICATION_ALLOWED_ERR if cdata
is readonly.
◆ _dom_characterdata_replace_data()
Replace a section of a character data node's content
- Parameters
-
cdata | The node to modify |
offset | The character offset of the sequence to replace |
count | The number of characters to replace |
data | The replacement data |
- Returns
- DOM_NO_ERR on success, DOM_INDEX_SIZE_ERR if
offset
is negative or greater than the number of characters in cdata
or count
is negative, DOM_NO_MODIFICATION_ALLOWED_ERR if cdata
is readonly.
◆ _dom_characterdata_set_data()
Set the content of a character data node
- Parameters
-
cdata | Node to set the content of |
data | New value for node |
- Returns
- DOM_NO_ERR on success, DOM_NO_MODIFICATION_ALLOWED_ERR if
cdata
is readonly.
The new content will have its reference count increased, so the caller should unref it after the call (as the caller should have already claimed a reference on the string). The node's existing content will be unrefed.
◆ _dom_characterdata_set_text_content()
◆ _dom_characterdata_substring_data()
Extract a range of data from a character data node
- Parameters
-
cdata | The node to extract data from |
offset | The character offset of substring to extract |
count | The number of characters to extract |
data | Pointer to location to receive substring |
- Returns
- DOM_NO_ERR on success, DOM_INDEX_SIZE_ERR if
offset
is negative or greater than the number of characters in cdata
or count
is negative.
The returned string will have its reference count increased. It is the responsibility of the caller to unref the string once it has finished with it.
DOM3Core states that this can raise DOMSTRING_SIZE_ERR. It will not in this implementation; dom_strings are unbounded.
◆ characterdata_vtable