axl main logo
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Modules Pages
axl_bool axl_doc_dump_to_file ( axlDoc doc,
const char *  file_path 

Allows to dump a xml document directly to the file located at the file path.

This function saves you the round trip to declare variables to hold the memory, open a file, dump the content and properly close the output file. The function works the same as axl_doc_dump but doing the extra job to transfer the xml document into a file.

See also axl_doc_dump_pretty_to_file to get a version dumps the content doing some pretty printing operations.

docThe document to be dumped into a file.
file_pathThe file path where the output will be placed. The function will require to have access rights to the file (or to create a new file if it doesnt exists). The default behaviour is to overwrite the file found if exists. So, if you don't want to get content overwrited, you must provide the enough code to avoid such situations prior calling to this function.
axl_true if the dump operation was ok, otherwisde axl_false is returned.

References axl_false, axl_free(), AXL_LEVEL_CRITICAL, and AXL_LEVEL_DEBUG.