]> mj.ucw.cz Git - libucw.git/blobdiff - sherlock/xml/xml.h
Doc: Described ff-binary.
[libucw.git] / sherlock / xml / xml.h
index 41bf46f96fe418c8fb10a54af168337c0e02be55..e94588836bf733470c2d008725d08b06fa140252 100644 (file)
 #ifndef _SHERLOCK_XML_XML_H
 #define _SHERLOCK_XML_XML_H
 
-#include "lib/clists.h"
-#include "lib/slists.h"
-#include "lib/mempool.h"
-#include "lib/fastbuf.h"
+#include "ucw/clists.h"
+#include "ucw/slists.h"
+#include "ucw/mempool.h"
+#include "ucw/fastbuf.h"
 
 struct xml_context;
 struct xml_dtd_entity;
@@ -81,6 +81,7 @@ enum xml_flags {
   XML_VALIDATING =                     0x00000100,     /* Validate everything (not fully implemented!) */
   XML_PARSE_DTD =                      0x00000200,     /* Enable parsing of DTD */
   XML_NO_CHARS =                       0x00000400,     /* The current element must not contain character data (filled automaticaly if using DTD) */
+  XML_ALLOC_DEFAULT_ATTRS =            0x00000800,     /* Allocate default attribute values so they can be found by XML_ATTR_FOR_EACH */
 
   /* Internals, do not change! */
   XML_EMPTY_ELEM_TAG =                 0x00010000,     /* The current element match EmptyElemTag */
@@ -257,6 +258,12 @@ void xml_def_resolve_entity(struct xml_context *ctx, struct xml_dtd_entity *ent)
 /* Remove leading/trailing spaces and replaces sequences of spaces to a single space character (non-CDATA attribute normalization) */
 uns xml_normalize_white(struct xml_context *ctx, char *value);
 
+/* Merge character contents of a given element to a single string (not recursive) */
+char *xml_merge_chars(struct xml_context *ctx, struct xml_node *node, struct mempool *pool);
+
+/* Merge character contents of a given subtree to a single string */
+char *xml_merge_dom_chars(struct xml_context *ctx, struct xml_node *node, struct mempool *pool);
+
 /* Public part of error handling */
 void xml_warn(struct xml_context *ctx, const char *format, ...);
 void xml_error(struct xml_context *ctx, const char *format, ...);