axl main logo
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Modules Pages
char* axl_item_get_content ( axlItem item,
int *  size 
)

Convenience API that allows to get the content stored (and its size) from the received axlItem, supposing it is storing an ITEM_CONTENT, ITEM_CDATA, ITEM_COMMENT or ITEM_REF.

Parameters
itemThe axlItem that is supposed to store an item with type: ITEM_CONTENT, ITEM_CDATA, ITEM_COMMENT or ITEM_REF.
sizeOptional variable reference. If defined, if returns the content size.
Returns
An internal reference to the content stored and optionally the content size notified on the variable received. In the case the function receives an incompatible axlItem (which is not ITEM_CONTENT, ITEM_CDATA, ITEM_COMMENT or ITEM_REF), the function will return NULL, and the optional variable will be filled with -1.

References axl_item_get_type(), axl_return_val_if_fail, ITEM_NODE, and ITEM_PI.