summaryrefslogtreecommitdiff
path: root/README.xml
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2015-08-22 20:11:05 +0200
committerHiltjo Posthuma <hiltjo@codemadness.org>2015-08-22 20:11:05 +0200
commit2d5b42efae35300a9eb7cc3a834dc8c522bf5a71 (patch)
treeee85145ae4e426bf2ea2e01934d43545d5bc39a2 /README.xml
parent1ad44956f0f7b044440f04ee72a7affef48b804c (diff)
xml: simplify XML reader
Diffstat (limited to 'README.xml')
-rw-r--r--README.xml5
1 files changed, 4 insertions, 1 deletions
diff --git a/README.xml b/README.xml
index 5385ecf..c949da5 100644
--- a/README.xml
+++ b/README.xml
@@ -55,6 +55,8 @@ Should be trivial, see xml.c and xml.h and the examples below.
The most minimal implementation to read and parse from fd 0 (stdin) is:
+ #include <stdio.h>
+
#include "xml.h"
static XMLParser x;
@@ -62,7 +64,8 @@ The most minimal implementation to read and parse from fd 0 (stdin) is:
int
main(void)
{
- xml_parse_fd(&x, 0); /* xml_parse_buf(&x, "<sup />", 7); */
+ x.getnext = getchar;
+ xml_parse(&x);
return 0;
}