summaryrefslogtreecommitdiff
path: root/src/xml-parser.c
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@users.sourceforge.net>2009-04-11 15:43:15 +0200
committerTomas Bzatek <tbzatek@users.sourceforge.net>2009-04-11 15:43:15 +0200
commit9c2c964727e4a484acf7f97267a3cf1c8fbacd89 (patch)
tree261f5ffe6954aaecb2f7ad29edfa459ae0971148 /src/xml-parser.c
parent6a54c7817bb71fde9234e7b89e87f1f349920ea1 (diff)
downloadcataract-9c2c964727e4a484acf7f97267a3cf1c8fbacd89.tar.xz
Print statistics in verbose mode
Diffstat (limited to 'src/xml-parser.c')
-rw-r--r--src/xml-parser.c13
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;
}