axl main logo
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Modules Pages
void axl_node_annotate_data ( axlNode node,
const char *  key,
axlPointer  data 
)

Allows to store user defined data associated to the node that is not visible from an XML perspective.

This function allows to store data associated to the node and to retrieve it later in an inherited fashion. This allows to store semantic/metadata information while parsing xml documents.

This function stores the given key using a hash, associating the data provided on the given node. You can also check the axl_node_annotate_data_full which performs the same task but allowing to provide key and data destroy functions.

Once data is stored, it could be inherited by child nodes because the access to it is done using axl_node_annotate_get which can configure the data lookup to into the particular node or its parents.

Additionally, you can also perform annotation using native types: int, string and double. Check the following functions to do so.

Parameters
nodeThe node where the annotated data will be stored.
keyThe key under which the annotated data will be stored (and indexed).
dataThe data to be stored associated to the key provided.

References axl_hash_insert(), and axl_return_if_fail.