summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mxml.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/mxml.c b/mxml.c
index 06be305..8bb4e32 100644
--- a/mxml.c
+++ b/mxml.c
@@ -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;
}