#ifndef MUPDF_FITZ_XML_H1#define MUPDF_FITZ_XML_H23#include "mupdf/fitz/system.h"4#include "mupdf/fitz/context.h"56/*7XML document model8*/910typedef struct fz_xml_s fz_xml;1112/*13fz_parse_xml: Parse a zero-terminated string into a tree of xml nodes.1415preserve_white: whether to keep or delete all-whitespace nodes.16*/17fz_xml *fz_parse_xml(fz_context *ctx, unsigned char *buf, int len, int preserve_white);1819/*20fz_xml_prev: Return previous sibling of XML node.21*/22fz_xml *fz_xml_prev(fz_xml *item);2324/*25fz_xml_next: Return next sibling of XML node.26*/27fz_xml *fz_xml_next(fz_xml *item);2829/*30fz_xml_up: Return parent of XML node.31*/32fz_xml *fz_xml_up(fz_xml *item);3334/*35fz_xml_down: Return first child of XML node.36*/37fz_xml *fz_xml_down(fz_xml *item);3839/*40fz_xml_is_tag: Return true if the tag name matches.41*/42int fz_xml_is_tag(fz_xml *item, const char *name);4344/*45fz_xml_tag: Return tag of XML node. Return NULL for text nodes.46*/47char *fz_xml_tag(fz_xml *item);4849/*50fz_xml_att: Return the value of an attribute of an XML node.51NULL if the attribute doesn't exist.52*/53char *fz_xml_att(fz_xml *item, const char *att);5455/*56fz_xml_text: Return the text content of an XML node.57Return NULL if the node is a tag.58*/59char *fz_xml_text(fz_xml *item);6061/*62fz_drop_xml: Free the XML node and all its children and siblings.63*/64void fz_drop_xml(fz_context *doc, fz_xml *item);6566/*67fz_detach_xml: Detach a node from the tree, unlinking it from its parent.68*/69void fz_detach_xml(fz_xml *node);7071/*72fz_debug_xml: Pretty-print an XML tree to stdout.73*/74void fz_debug_xml(fz_xml *item, int level);7576fz_xml *fz_xml_find(fz_xml *item, const char *tag);77fz_xml *fz_xml_find_next(fz_xml *item, const char *tag);78fz_xml *fz_xml_find_down(fz_xml *item, const char *tag);7980#endif818283