libplist  2.7.0
API Documentation - Return to Homepage

◆ plist_to_xml()

PLIST_API plist_err_t plist_to_xml ( plist_t  plist,
char **  plist_xml,
uint32_t *  length 
)

Export the plist_t structure to XML format.

Parameters
plistthe root node to export
plist_xmla pointer to a C-string. This function allocates the memory, caller is responsible for freeing it. Data is UTF-8 encoded.
lengtha pointer to an uint32_t variable. Represents the length of the allocated buffer.
Returns
PLIST_ERR_SUCCESS on success or a plist_err_t on failure
Note
Use plist_mem_free() to free the allocated memory.