axlDoc * axl_doc_parse_from_file ( const char *  file_path,
axlError **  error 
)

Allows to parse an xml document from the given file path location.

This function works the same way like axl_doc_parse and axl_doc_parse_strings, but using as an input, the selected file provided by the path. In fact, all this function, use the same xml parse engine. The advantage of this function is that it is more efficient while reading huge xml files.

Here is an example:

 axlDoc   * doc = NULL;
 axlError * error = NULL;

 // parse the provide file
 doc = axl_doc_parse_from_file ("test.xml", &error);
 if (doc == NULL) {
    // check error found
    printf ("ERROR: (code: %d) %s\n",
            axl_error_get_code (error),
            axl_error_get (error));
    axl_error_free (error);
    return -1;
 }

 // do some stuff with the readed document
 
 // release it once no longer needed
 axl_doc_free (doc);

Parameters:
file_path The file path to report.
error The axlError where errors found will be reported.
Returns: