diff options
-rw-r--r-- | mxml.c | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -6,7 +6,6 @@ int process(FILE *f) { mxml_node_t *root, *node, *next; const char* elename; - int space = 0; root = mxmlLoadFile(NULL, f, MXML_TEXT_CALLBACK); @@ -24,14 +23,13 @@ int process(FILE *f) { if (!strcmp(elename, "article-title")) { printf("article title:"); for (mxml_node_t *txt = next->child; txt; txt = mxmlGetNextSibling(txt)) { - + // Thanks to + // // https://github.com/younix/sj/blob/master/messaged.c#L237 - const char* text = mxmlGetText(txt, &space); - //if (space) { - printf(" %s", text); - //} - + const char* text = mxmlGetText(txt, NULL); + printf(" %s", text); } + printf("\n"); break; } |