summaryrefslogtreecommitdiff
path: root/include/mupdf/fitz/xml.h
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2014-09-02 20:34:48 +0200
committerTor Andersson <tor.andersson@artifex.com>2014-09-17 12:06:07 +0200
commit13e335fd06789a42369d03b2cad65818014f3f79 (patch)
tree3ad0982c256b58e675b73e66427d4d2a6c44d16d /include/mupdf/fitz/xml.h
parent758a9a75fd34bd8312b07f1be72aeee63522d2a0 (diff)
downloadmupdf-13e335fd06789a42369d03b2cad65818014f3f79.tar.xz
Improve XML parser.
Add a whitespace preserving mode, for future use with XHTML. Also parse XHTML entities. This is not strictly according to spec, but for properly formed XML documents it should not matter.
Diffstat (limited to 'include/mupdf/fitz/xml.h')
-rw-r--r--include/mupdf/fitz/xml.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/include/mupdf/fitz/xml.h b/include/mupdf/fitz/xml.h
index ce391029..85ed4a2a 100644
--- a/include/mupdf/fitz/xml.h
+++ b/include/mupdf/fitz/xml.h
@@ -12,8 +12,15 @@ typedef struct fz_xml_s fz_xml;
/*
fz_parse_xml: Parse a zero-terminated string into a tree of xml nodes.
+
+ preserve_white: whether to keep or delete all-whitespace nodes.
+*/
+fz_xml *fz_parse_xml(fz_context *ctx, unsigned char *buf, int len, int preserve_white);
+
+/*
+ fz_xml_prev: Return previous sibling of XML node.
*/
-fz_xml *fz_parse_xml(fz_context *ctx, unsigned char *buf, int len);
+fz_xml *fz_xml_prev(fz_xml *item);
/*
fz_xml_next: Return next sibling of XML node.
@@ -21,6 +28,11 @@ fz_xml *fz_parse_xml(fz_context *ctx, unsigned char *buf, int len);
fz_xml *fz_xml_next(fz_xml *item);
/*
+ fz_xml_up: Return parent of XML node.
+*/
+fz_xml *fz_xml_up(fz_xml *item);
+
+/*
fz_xml_down: Return first child of XML node.
*/
fz_xml *fz_xml_down(fz_xml *item);