summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ezxml.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ezxml.c b/ezxml.c
index 952b24d..c981bb2 100644
--- a/ezxml.c
+++ b/ezxml.c
@@ -5,13 +5,13 @@
int process(char *fn) {
ezxml_t ezdoc = ezxml_parse_file(fn);
- if (ezdoc) {
- printf("Got a document\n");
+ if (!ezdoc) {
+ printf("Error when parsing file.\n");
}
- ezxml_t title = ezxml_get(ezdoc, "article-meta", 0, "title-group", 0, "article-title", 0, -1);
+ ezxml_t title = ezxml_get(ezdoc, "front", 0, "article-meta", 0, "title-group", 0, "article-title", -1);
if (title) {
- printf("title: %s", title->txt);
+ printf("title: %s\n", title->txt);
}
return 0;