diff options
author | Hiltjo Posthuma <hiltjo@codemadness.org> | 2015-08-22 20:11:05 +0200 |
---|---|---|
committer | Hiltjo Posthuma <hiltjo@codemadness.org> | 2015-08-22 20:11:05 +0200 |
commit | 2d5b42efae35300a9eb7cc3a834dc8c522bf5a71 (patch) | |
tree | ee85145ae4e426bf2ea2e01934d43545d5bc39a2 /README.xml | |
parent | 1ad44956f0f7b044440f04ee72a7affef48b804c (diff) |
xml: simplify XML reader
Diffstat (limited to 'README.xml')
-rw-r--r-- | README.xml | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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; } |