From 7973f7fed6475ebade8b94e269c4df29296e32a3 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 20 May 2005 16:24:09 +0200 Subject: xml mini-dom using expat --- apps/samxml.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 apps/samxml.c (limited to 'apps/samxml.c') diff --git a/apps/samxml.c b/apps/samxml.c new file mode 100644 index 00000000..ab5a82e1 --- /dev/null +++ b/apps/samxml.c @@ -0,0 +1,26 @@ +#include "fitz.h" +#include "samus.h" + +int main(int argc, char **argv) +{ + fz_error *error; + fz_file *file; + sa_xmlnode *xml; + + error = fz_openfile(&file, argv[1], FZ_READ); + if (error) + fz_abort(error); + + error = sa_parsexml(&xml, file, 0); + if (error) + fz_abort(error); + + fz_closefile(file); + + sa_debugxml(xml, 0); + + sa_dropxml(xml); + + return 0; +} + -- cgit v1.2.3