diff options
-rw-r--r-- | yxml.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -93,6 +93,7 @@ int process(char *fn, yxml_t *state) { switch(r) { case YXML_ELEMSTART: if (!strcmp(state->elem, "article-title")) { + printf("start: %s\n", state->elem); inelement = 1; } break; @@ -104,12 +105,12 @@ int process(char *fn, yxml_t *state) { break; case YXML_ELEMEND: - if (strcmp(state->elem, "article-title")) { - break; + printf("elementend: %s\n", state->elem); + if (inelement) { + inelement = 0; + printf("%s\n", contentbuf->buffer); + buffer_reset(contentbuf); } - inelement = 0; - printf("%s\n", contentbuf->buffer); - buffer_reset(contentbuf); break; } } |