summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--yxml.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/yxml.c b/yxml.c
index b55999a..1fd0f51 100644
--- a/yxml.c
+++ b/yxml.c
@@ -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;
}
}