summaryrefslogtreecommitdiff
path: root/include/mupdf/fitz/xml.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/mupdf/fitz/xml.h')
-rw-r--r--include/mupdf/fitz/xml.h29
1 files changed, 18 insertions, 11 deletions
diff --git a/include/mupdf/fitz/xml.h b/include/mupdf/fitz/xml.h
index caf5b3ba..d3cbd647 100644
--- a/include/mupdf/fitz/xml.h
+++ b/include/mupdf/fitz/xml.h
@@ -8,6 +8,7 @@
XML document model
*/
+typedef struct fz_xml_doc_s fz_xml_doc;
typedef struct fz_xml_s fz_xml;
/*
@@ -15,7 +16,23 @@ typedef struct fz_xml_s fz_xml;
preserve_white: whether to keep or delete all-whitespace nodes.
*/
-fz_xml *fz_parse_xml(fz_context *ctx, fz_buffer *buf, int preserve_white);
+fz_xml_doc *fz_parse_xml(fz_context *ctx, fz_buffer *buf, int preserve_white);
+
+/*
+ fz_drop_xml: Free the XML node and all its children and siblings.
+*/
+void fz_drop_xml(fz_context *ctx, fz_xml_doc *xml);
+
+/*
+ fz_detach_xml: Detach a node from the tree, unlinking it from its parent,
+ and setting the document root to the node.
+*/
+void fz_detach_xml(fz_context *ctx, fz_xml_doc *xml, fz_xml *node);
+
+/*
+ fz_xml_root: Get the root node for the document.
+*/
+fz_xml *fz_xml_root(fz_xml_doc *xml);
/*
fz_xml_prev: Return previous sibling of XML node.
@@ -60,16 +77,6 @@ char *fz_xml_att(fz_xml *item, const char *att);
char *fz_xml_text(fz_xml *item);
/*
- fz_drop_xml: Free the XML node and all its children and siblings.
-*/
-void fz_drop_xml(fz_context *doc, fz_xml *item);
-
-/*
- fz_detach_xml: Detach a node from the tree, unlinking it from its parent.
-*/
-void fz_detach_xml(fz_xml *node);
-
-/*
fz_debug_xml: Pretty-print an XML tree to stdout.
*/
void fz_debug_xml(fz_xml *item, int level);