libdom
Loading...
Searching...
No Matches
Classes | Functions
entity_ref.c File Reference
#include <stdlib.h>
#include "core/document.h"
#include "core/entity_ref.h"
#include "core/node.h"
#include "utils/utils.h"

Classes

struct  dom_entity_reference
 

Functions

dom_exception _dom_entity_reference_create (dom_document *doc, dom_string *name, dom_string *value, dom_entity_reference **result)
 
void _dom_entity_reference_destroy (dom_entity_reference *entity)
 
dom_exception _dom_entity_reference_get_textual_representation (dom_entity_reference *entity, dom_string **result)
 
void _dom_er_destroy (dom_node_internal *node)
 
dom_exception _dom_er_copy (dom_node_internal *old, dom_node_internal **copy)
 

Function Documentation

◆ _dom_entity_reference_create()

dom_exception _dom_entity_reference_create ( dom_document * doc,
dom_string * name,
dom_string * value,
dom_entity_reference ** result )

Create an entity reference

Parameters
docThe owning document
nameThe name of the node to create
valueThe text content of the node
resultPointer to location to receive created node
Returns
DOM_NO_ERR on success, DOM_NO_MEM_ERR on memory exhaustion.

::doc, ::name and ::value will have their reference counts increased.

The returned node will already be referenced.

◆ _dom_entity_reference_destroy()

void _dom_entity_reference_destroy ( dom_entity_reference * entity)

Destroy an entity reference

Parameters
entityThe entity reference to destroy

The contents of ::entity will be destroyed and ::entity will be freed.

◆ _dom_entity_reference_get_textual_representation()

dom_exception _dom_entity_reference_get_textual_representation ( dom_entity_reference * entity,
dom_string ** result )

Get the textual representation of an EntityRererence

Parameters
entityThe entity reference to get the textual representation of
resultPointer to location to receive result
Returns
DOM_NO_ERR on success.

The returned string will have its reference count increased. It is the responsibility of the caller to unrer the string once it has finished with it.

◆ _dom_er_copy()

dom_exception _dom_er_copy ( dom_node_internal * old,
dom_node_internal ** copy )

◆ _dom_er_destroy()

void _dom_er_destroy ( dom_node_internal * node)