diff options
author | Silvan Jegen <s.jegen@gmail.com> | 2016-09-04 21:26:36 +0200 |
---|---|---|
committer | Silvan Jegen <s.jegen@gmail.com> | 2016-09-04 21:26:36 +0200 |
commit | 3fec4606d27a1d9e41a40bb89060494763f9978b (patch) | |
tree | d4d192a7d5ceb9455b93f41737e11cf200129035 | |
parent | b2134c3e65938f96f3e1d631b2cee793cb27d298 (diff) |
Specify the complete path
-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; |