summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorTor Andersson <tor@ghostscript.com>2005-05-20 16:24:09 +0200
committerTor Andersson <tor@ghostscript.com>2005-05-20 16:24:09 +0200
commit7973f7fed6475ebade8b94e269c4df29296e32a3 (patch)
tree255d0900a2e1253b4e640919acb4604f53a6b2a6 /apps
parent143a2db01c7bb9ea7194299ac382bd780fd94548 (diff)
downloadmupdf-7973f7fed6475ebade8b94e269c4df29296e32a3.tar.xz
xml mini-dom using expat
Diffstat (limited to 'apps')
-rw-r--r--apps/samxml.c26
1 files changed, 26 insertions, 0 deletions
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;
+}
+