axl main logo
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Modules Pages
axlNode * axl_node_parse ( axlError **  error,
const char *  content,

Allows to create a complete node configuring not only the node but its content, using a printf-like format.

This handy function, like axl_node_parse_strings, allows to create complex xml structures providing inline content.

Here is an example:

1 axlNode * node = axl_node_parse (NULL, "<content attr='value' attr2='value'>This is content</content>");

The previous call will create a node called content with the provided attributes and content, in one step.

The node returned can be integrated into a xml document using usual API, for example: axl_node_set_child or axl_doc_set_root.

errorThe optional error reference holding the returned result.
contentThe content to be used to create the node.
A reference to a newly allocated axlNode or NULL if it fails. The axlError is filled with the error found if provided by the caller.

References axl_doc_free(), axl_doc_get_root(), axl_doc_parse(), axl_free(), AXL_LEVEL_DEBUG, axl_node_annotate_data_full(), axl_node_deattach(), and axl_strdup_printfv.