axl main logo
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Modules Pages
axlItem* axl_item_new ( AxlItemType  type,
axlPointer  data 

Allows to create an axlItem, with the provided type and holding the provided data.

The function won't configure the parent node holding the item. There is an alternative API that allows to create an axlItem without performing a copy: axl_item_new_ref.

typeThe type that will represent the axlItem created.
dataData associated to the axlItem. In the case the axlItem being created will represent content (ITEM_CONTENT), an entity ref (ITEM_REF), a comment (ITEM_COMMENT) or cdata (ITEM_CDATA), the function will create a local copy. In the case of a ITEM_NODE, the function will copy the entire node, and all its childs.
A newly allocated axlItem with no parent and holding the data provided.

References axl_item_get_type(), axl_new, axl_node_copy(), axl_pi_copy(), axl_strdup(), axl_true, ITEM_CDATA, ITEM_COMMENT, ITEM_CONTENT, ITEM_NODE, ITEM_PI, and ITEM_REF.