diff options
-rw-r--r-- | ezxml.c | 28 |
1 files changed, 28 insertions, 0 deletions
@@ -0,0 +1,28 @@ +#include <stdio.h> +#include <stdlib.h> + +#include "ezxmllib.h" + +int process(char *fn) { + ezxml_t ezdoc = ezxml_parse_file(fn); + if (ezdoc) { + printf("Got a document\n"); + } + + ezxml_t title = ezxml_get(ezdoc, "article-meta", 0, "title-group", 0, "article-title", 0, -1); + if (title) { + printf("title: %s", title->txt); + } + + return 0; +} + +int main(int argc, char *argv[]) { + + for (int i = 0; i < argc; i++) { + process(argv[i]); + } + + return 0; +} + |