axl main logo
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Modules Pages
void axl_node_annotate_string ( axlNode node,
const char *  key,
const char *  string_value 

Allows to perform an annotation to the node at runtime, storing a string value.

While using xml documents loaded into memory, each node could be processed and annotated with particular information, indexed with a key, that could be retrieved later for faster process.

This data annotation doesn't perform any modification to the xml document in any form. It is just a programming support that allows developers to avoid creating complex and independent structures to the xml document while developing XML based solutions.

While using annotation support, you can use low level functions that provide a simple way to store pointers associated to particular nodes and retrieve them using:

However, additional functions are provided to store and retreive easily integers, strings and double data annotated. See the following:

If you use this function to store a string data you must use axl_node_annotate_get_string to retreive data stored. You can't use axl_node_annotate_get.

nodeThe node where the annotation will be aplied.
keyThe key to index the data annotated to the node.
string_valueA string value that will be annotated to the node received under the key provided. This value will be copied and released once the node is deallocated.

References axl_new, axl_node_annotate_data_full(), axl_return_if_fail, and axl_strdup().