Contents Previous Next

mxmlSaveAllocString()


Description

Save an XML node tree to an allocated string. This function returns a pointer to a string containing the textual representation of the XML node tree. The string should be freed using the free() function when you are done with it. NULL is returned if the node would produce an empty string or if the string cannot be allocated.

Syntax

char *
mxmlSaveAllocString(
    mxml_node_t * node,
    const char * (*cb)(mxml_node_t *node, int ws));

Arguments

NameDescription
nodeNode to write
(*cb)(mxml_node_t *node, int ws)Whitespace callback or MXML_NO_CALLBACK

Returns

Allocated string or NULL


Contents Previous Next