summaryrefslogtreecommitdiff
path: root/apps/samxml.c
diff options
context:
space:
mode:
authorTor Andersson <tor@ghostscript.com>2005-05-24 06:15:44 +0200
committerTor Andersson <tor@ghostscript.com>2005-05-24 06:15:44 +0200
commitd759c948debd9e2dd79eb220b10682681c446e3e (patch)
tree06d21862dfb9f576c1a04e55a910abe9a2733df4 /apps/samxml.c
parent8bebcc1c8187906736e3f82b99ee07cb06df0326 (diff)
downloadmupdf-d759c948debd9e2dd79eb220b10682681c446e3e.tar.xz
put infernal parser api on top of mini-dom to hide it
Diffstat (limited to 'apps/samxml.c')
-rw-r--r--apps/samxml.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/apps/samxml.c b/apps/samxml.c
index ab5a82e1..c42d8036 100644
--- a/apps/samxml.c
+++ b/apps/samxml.c
@@ -5,21 +5,23 @@ int main(int argc, char **argv)
{
fz_error *error;
fz_file *file;
- sa_xmlnode *xml;
+ sa_xmlparser *parser;
+ sa_xmlitem *item;
error = fz_openfile(&file, argv[1], FZ_READ);
if (error)
fz_abort(error);
- error = sa_parsexml(&xml, file, 0);
+ error = sa_openxml(&parser, file, 0);
if (error)
fz_abort(error);
-
- fz_closefile(file);
-
- sa_debugxml(xml, 0);
- sa_dropxml(xml);
+ item = sa_xmlnext(parser);
+ if (item)
+ sa_debugxml(item, 0);
+
+ sa_closexml(parser);
+ fz_closefile(file);
return 0;
}