diff options
Diffstat (limited to 'src/xml-parser.c')
| -rw-r--r-- | src/xml-parser.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/xml-parser.c b/src/xml-parser.c index eb6c86f..34c0ebd 100644 --- a/src/xml-parser.c +++ b/src/xml-parser.c @@ -29,6 +29,7 @@ #include <glib.h> #include "xml-parser.h" +#include "gallery-utils.h" @@ -46,7 +47,7 @@ xml_parser_load (const char *filename) /* Load XML document */ file->doc = xmlParseFile (filename); if (file->doc == NULL) { - fprintf (stderr, "Error: unable to parse file \"%s\"\n", filename); + log_error ("Error: unable to parse file \"%s\"\n", filename); free (file); return NULL; } @@ -54,7 +55,7 @@ xml_parser_load (const char *filename) /* Create xpath evaluation context */ file->xpathCtx = xmlXPathNewContext (file->doc); if (file->xpathCtx == NULL) { - fprintf (stderr, "Error: unable to create new XPath context\n"); + log_error ("Error: unable to create new XPath context\n"); xmlFreeDoc (file->doc); free (file); return FALSE; @@ -95,7 +96,7 @@ xml_file_get_node_name (TXMLFile *file, const char *x_path) /* Evaluate xpath expression */ xpathObj = xmlXPathEvalExpression ((const xmlChar *) x_path, file->xpathCtx); if (xpathObj == NULL) { - fprintf (stderr, "Error: unable to evaluate xpath expression \"%s\"\n", x_path); + log_error ("Error: unable to evaluate xpath expression \"%s\"\n", x_path); return NULL; } @@ -130,7 +131,7 @@ xml_file_get_node_value (TXMLFile *file, const char *x_path) /* Evaluate xpath expression */ xpathObj = xmlXPathEvalExpression ((const xmlChar *) x_path, file->xpathCtx); if (xpathObj == NULL) { - fprintf (stderr, "Error: unable to evaluate xpath expression \"%s\"\n", x_path); + log_error ("Error: unable to evaluate xpath expression \"%s\"\n", x_path); return NULL; } @@ -185,7 +186,7 @@ xml_file_get_node_attribute (TXMLFile *file, const char *x_path, const char *att /* Evaluate xpath expression */ xpathObj = xmlXPathEvalExpression ((const xmlChar *) x_path, file->xpathCtx); if (xpathObj == NULL) { - fprintf (stderr, "Error: unable to evaluate xpath expression \"%s\"\n", x_path); + log_error ("Error: unable to evaluate xpath expression \"%s\"\n", x_path); return NULL; } @@ -248,7 +249,7 @@ xml_file_node_get_children_count (TXMLFile *file, const char *x_path) /* Evaluate xpath expression */ xpathObj = xmlXPathEvalExpression ((const xmlChar *) x_path, file->xpathCtx); if (xpathObj == NULL) { - fprintf (stderr, "Error: unable to evaluate xpath expression \"%s\"\n", x_path); + log_error ("Error: unable to evaluate xpath expression \"%s\"\n", x_path); return 0; } |
