diff options
author | Tor Andersson <tor@ghostscript.com> | 2005-05-24 06:15:44 +0200 |
---|---|---|
committer | Tor Andersson <tor@ghostscript.com> | 2005-05-24 06:15:44 +0200 |
commit | d759c948debd9e2dd79eb220b10682681c446e3e (patch) | |
tree | 06d21862dfb9f576c1a04e55a910abe9a2733df4 /include | |
parent | 8bebcc1c8187906736e3f82b99ee07cb06df0326 (diff) | |
download | mupdf-d759c948debd9e2dd79eb220b10682681c446e3e.tar.xz |
put infernal parser api on top of mini-dom to hide it
Diffstat (limited to 'include')
-rw-r--r-- | include/samus/xml.h | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/include/samus/xml.h b/include/samus/xml.h index 04308b66..fa798cd3 100644 --- a/include/samus/xml.h +++ b/include/samus/xml.h @@ -1,22 +1,26 @@ /* - * XML mini-dom based on Inferno's XML parser API. - * This one uses expat and in-memory objects though... :( + * A simple XML parsing API based on Inferno's. + * Under the surface this one uses expat and in-memory objects, + * but that should not be visible through the API. */ -typedef struct sa_xmlnode_s sa_xmlnode; +typedef struct sa_xmlparser_s sa_xmlparser; +typedef struct sa_xmlitem_s sa_xmlitem; -fz_error *sa_parsexml(sa_xmlnode **nodep, fz_file *file, int ns); -void sa_debugxml(sa_xmlnode *node, int level); -void sa_dropxml(sa_xmlnode *node); +fz_error *sa_openxml(sa_xmlparser **spp, fz_file *file, int ns); +void sa_debugxml(sa_xmlitem *item, int level); +void sa_closexml(sa_xmlparser *sp); -sa_xmlnode *sa_xmlup(sa_xmlnode *node); -sa_xmlnode *sa_xmlnext(sa_xmlnode *node); -sa_xmlnode *sa_xmldown(sa_xmlnode *node); +sa_xmlitem *sa_xmlnext(sa_xmlparser *sp); +void sa_xmldown(sa_xmlparser *sp); +void sa_xmlup(sa_xmlparser *sp); -int sa_isxmltext(sa_xmlnode *node); -int sa_isxmltag(sa_xmlnode *node); +int sa_isxmlerror(sa_xmlitem *item); +int sa_isxmltext(sa_xmlitem *item); +int sa_isxmltag(sa_xmlitem *item); -char *sa_getxmlname(sa_xmlnode *node); -char *sa_getxmlatt(sa_xmlnode *node, char *att); -char *sa_getxmltext(sa_xmlnode *node); +char *sa_getxmlerror(sa_xmlitem *item); +char *sa_getxmlname(sa_xmlitem *item); +char *sa_getxmlatt(sa_xmlitem *item, char *att); +char *sa_getxmltext(sa_xmlitem *item); |