Contents Previous Next

mxmlSaveFile()

Description

Save an XML tree to a file.

The callback argument specifies a function that returns a whitespace string or NULL before and after each element. If MXML_NO_CALLBACK is specified, whitespace will only be added before MXML_TEXT nodes with leading whitespace and before attribute names inside opening element tags.

Syntax

int
mxmlSaveFile( mxml_node_t * node, FILE * fp, mxml_save_cb_t cb);

Arguments

NameDescription
nodeNode to write
fpFile to write to
cbWhitespace callback or MXML_NO_CALLBACK

Returns

0 on success, -1 on error.


Contents Previous Next