diff options
-rw-r--r-- | ezxml.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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; |