Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 1 | /* |
Daniel Veillard | be58697 | 2003-11-18 20:56:51 +0000 | [diff] [blame] | 2 | * Summary: interfaces for tree manipulation |
| 3 | * Description: this module describes the structures found in an tree resulting |
| 4 | * from an XML or HTML parsing, as well as the API provided for |
| 5 | * various processing on that tree |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 6 | * |
Daniel Veillard | be58697 | 2003-11-18 20:56:51 +0000 | [diff] [blame] | 7 | * Copy: See Copyright for the status of this software. |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 8 | * |
Daniel Veillard | be58697 | 2003-11-18 20:56:51 +0000 | [diff] [blame] | 9 | * Author: Daniel Veillard |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 10 | */ |
| 11 | |
| 12 | #ifndef __XML_TREE_H__ |
| 13 | #define __XML_TREE_H__ |
| 14 | |
| 15 | #include <stdio.h> |
| 16 | #include <libxml/xmlversion.h> |
William M. Brack | a2e844a | 2004-01-06 11:52:13 +0000 | [diff] [blame] | 17 | #include <libxml/xmlstring.h> |
Igor Zlatkovic | 7ae91bc | 2002-11-08 17:18:52 +0000 | [diff] [blame] | 18 | |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 19 | #ifdef __cplusplus |
| 20 | extern "C" { |
| 21 | #endif |
| 22 | |
Daniel Veillard | 8bdb91d | 2001-10-31 17:52:43 +0000 | [diff] [blame] | 23 | /* |
| 24 | * Some of the basic types pointer to structures: |
| 25 | */ |
| 26 | /* xmlIO.h */ |
| 27 | typedef struct _xmlParserInputBuffer xmlParserInputBuffer; |
| 28 | typedef xmlParserInputBuffer *xmlParserInputBufferPtr; |
| 29 | |
CET 2001 Daniel Veillard | 5a37bde | 2001-11-01 14:31:22 +0000 | [diff] [blame] | 30 | typedef struct _xmlOutputBuffer xmlOutputBuffer; |
| 31 | typedef xmlOutputBuffer *xmlOutputBufferPtr; |
| 32 | |
Daniel Veillard | 8bdb91d | 2001-10-31 17:52:43 +0000 | [diff] [blame] | 33 | /* parser.h */ |
| 34 | typedef struct _xmlParserInput xmlParserInput; |
| 35 | typedef xmlParserInput *xmlParserInputPtr; |
| 36 | |
| 37 | typedef struct _xmlParserCtxt xmlParserCtxt; |
| 38 | typedef xmlParserCtxt *xmlParserCtxtPtr; |
| 39 | |
Daniel Veillard | 6c4ffaf | 2002-02-11 08:54:05 +0000 | [diff] [blame] | 40 | typedef struct _xmlSAXLocator xmlSAXLocator; |
| 41 | typedef xmlSAXLocator *xmlSAXLocatorPtr; |
| 42 | |
| 43 | typedef struct _xmlSAXHandler xmlSAXHandler; |
| 44 | typedef xmlSAXHandler *xmlSAXHandlerPtr; |
| 45 | |
| 46 | /* entities.h */ |
| 47 | typedef struct _xmlEntity xmlEntity; |
| 48 | typedef xmlEntity *xmlEntityPtr; |
| 49 | |
Daniel Veillard | 9d06d30 | 2002-01-22 18:15:52 +0000 | [diff] [blame] | 50 | /** |
| 51 | * BASE_BUFFER_SIZE: |
| 52 | * |
Daniel Veillard | 61f2617 | 2002-03-12 18:46:39 +0000 | [diff] [blame] | 53 | * default buffer size 4000. |
Daniel Veillard | 9d06d30 | 2002-01-22 18:15:52 +0000 | [diff] [blame] | 54 | */ |
Daniel Veillard | 6155d8a | 2003-08-19 15:01:28 +0000 | [diff] [blame] | 55 | #define BASE_BUFFER_SIZE 4096 |
Daniel Veillard | d046356 | 2001-10-13 09:15:48 +0000 | [diff] [blame] | 56 | |
Daniel Veillard | 5e2dace | 2001-07-18 19:30:27 +0000 | [diff] [blame] | 57 | /** |
Daniel Veillard | 465a000 | 2005-08-22 12:07:04 +0000 | [diff] [blame] | 58 | * xmlBufferAllocationScheme: |
| 59 | * |
| 60 | * A buffer allocation scheme can be defined to either match exactly the |
| 61 | * need or double it's allocated size each time it is found too small. |
| 62 | */ |
| 63 | |
| 64 | typedef enum { |
| 65 | XML_BUFFER_ALLOC_DOUBLEIT, |
| 66 | XML_BUFFER_ALLOC_EXACT, |
| 67 | XML_BUFFER_ALLOC_IMMUTABLE |
| 68 | } xmlBufferAllocationScheme; |
| 69 | |
| 70 | /** |
| 71 | * xmlBuffer: |
| 72 | * |
| 73 | * A buffer structure. |
| 74 | */ |
| 75 | typedef struct _xmlBuffer xmlBuffer; |
| 76 | typedef xmlBuffer *xmlBufferPtr; |
| 77 | struct _xmlBuffer { |
| 78 | xmlChar *content; /* The buffer content UTF8 */ |
| 79 | unsigned int use; /* The buffer size used */ |
| 80 | unsigned int size; /* The buffer size */ |
| 81 | xmlBufferAllocationScheme alloc; /* The realloc method */ |
| 82 | }; |
| 83 | |
| 84 | /** |
Daniel Veillard | 5e2dace | 2001-07-18 19:30:27 +0000 | [diff] [blame] | 85 | * XML_XML_NAMESPACE: |
| 86 | * |
| 87 | * This is the namespace for the special xml: prefix predefined in the |
Daniel Veillard | 61f2617 | 2002-03-12 18:46:39 +0000 | [diff] [blame] | 88 | * XML Namespace specification. |
Daniel Veillard | 5e2dace | 2001-07-18 19:30:27 +0000 | [diff] [blame] | 89 | */ |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 90 | #define XML_XML_NAMESPACE \ |
| 91 | (const xmlChar *) "http://www.w3.org/XML/1998/namespace" |
| 92 | |
Daniel Veillard | 67f8b1c | 2004-04-09 21:51:49 +0000 | [diff] [blame] | 93 | /** |
| 94 | * XML_XML_ID: |
| 95 | * |
| 96 | * This is the name for the special xml:id attribute |
| 97 | */ |
| 98 | #define XML_XML_ID (const xmlChar *) "xml:id" |
| 99 | |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 100 | /* |
Daniel Veillard | 61f2617 | 2002-03-12 18:46:39 +0000 | [diff] [blame] | 101 | * The different element types carried by an XML tree. |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 102 | * |
| 103 | * NOTE: This is synchronized with DOM Level1 values |
| 104 | * See http://www.w3.org/TR/REC-DOM-Level-1/ |
| 105 | * |
| 106 | * Actually this had diverged a bit, and now XML_DOCUMENT_TYPE_NODE should |
| 107 | * be deprecated to use an XML_DTD_NODE. |
| 108 | */ |
| 109 | typedef enum { |
| 110 | XML_ELEMENT_NODE= 1, |
| 111 | XML_ATTRIBUTE_NODE= 2, |
| 112 | XML_TEXT_NODE= 3, |
| 113 | XML_CDATA_SECTION_NODE= 4, |
| 114 | XML_ENTITY_REF_NODE= 5, |
| 115 | XML_ENTITY_NODE= 6, |
| 116 | XML_PI_NODE= 7, |
| 117 | XML_COMMENT_NODE= 8, |
| 118 | XML_DOCUMENT_NODE= 9, |
| 119 | XML_DOCUMENT_TYPE_NODE= 10, |
| 120 | XML_DOCUMENT_FRAG_NODE= 11, |
| 121 | XML_NOTATION_NODE= 12, |
| 122 | XML_HTML_DOCUMENT_NODE= 13, |
| 123 | XML_DTD_NODE= 14, |
| 124 | XML_ELEMENT_DECL= 15, |
| 125 | XML_ATTRIBUTE_DECL= 16, |
| 126 | XML_ENTITY_DECL= 17, |
| 127 | XML_NAMESPACE_DECL= 18, |
| 128 | XML_XINCLUDE_START= 19, |
| 129 | XML_XINCLUDE_END= 20 |
Daniel Veillard | eae522a | 2001-04-23 13:41:34 +0000 | [diff] [blame] | 130 | #ifdef LIBXML_DOCB_ENABLED |
| 131 | ,XML_DOCB_DOCUMENT_NODE= 21 |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 132 | #endif |
| 133 | } xmlElementType; |
| 134 | |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 135 | |
Daniel Veillard | bed7b05 | 2001-05-19 14:59:49 +0000 | [diff] [blame] | 136 | /** |
| 137 | * xmlNotation: |
| 138 | * |
Daniel Veillard | 61f2617 | 2002-03-12 18:46:39 +0000 | [diff] [blame] | 139 | * A DTD Notation definition. |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 140 | */ |
| 141 | |
| 142 | typedef struct _xmlNotation xmlNotation; |
| 143 | typedef xmlNotation *xmlNotationPtr; |
| 144 | struct _xmlNotation { |
Daniel Veillard | 9e7160d | 2001-03-18 23:17:47 +0000 | [diff] [blame] | 145 | const xmlChar *name; /* Notation name */ |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 146 | const xmlChar *PublicID; /* Public identifier, if any */ |
| 147 | const xmlChar *SystemID; /* System identifier, if any */ |
| 148 | }; |
| 149 | |
Daniel Veillard | bed7b05 | 2001-05-19 14:59:49 +0000 | [diff] [blame] | 150 | /** |
| 151 | * xmlAttributeType: |
| 152 | * |
Daniel Veillard | 61f2617 | 2002-03-12 18:46:39 +0000 | [diff] [blame] | 153 | * A DTD Attribute type definition. |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 154 | */ |
| 155 | |
| 156 | typedef enum { |
| 157 | XML_ATTRIBUTE_CDATA = 1, |
| 158 | XML_ATTRIBUTE_ID, |
| 159 | XML_ATTRIBUTE_IDREF , |
| 160 | XML_ATTRIBUTE_IDREFS, |
| 161 | XML_ATTRIBUTE_ENTITY, |
| 162 | XML_ATTRIBUTE_ENTITIES, |
| 163 | XML_ATTRIBUTE_NMTOKEN, |
| 164 | XML_ATTRIBUTE_NMTOKENS, |
| 165 | XML_ATTRIBUTE_ENUMERATION, |
| 166 | XML_ATTRIBUTE_NOTATION |
| 167 | } xmlAttributeType; |
| 168 | |
Daniel Veillard | bed7b05 | 2001-05-19 14:59:49 +0000 | [diff] [blame] | 169 | /** |
| 170 | * xmlAttributeDefault: |
| 171 | * |
Daniel Veillard | 61f2617 | 2002-03-12 18:46:39 +0000 | [diff] [blame] | 172 | * A DTD Attribute default definition. |
Daniel Veillard | bed7b05 | 2001-05-19 14:59:49 +0000 | [diff] [blame] | 173 | */ |
| 174 | |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 175 | typedef enum { |
| 176 | XML_ATTRIBUTE_NONE = 1, |
| 177 | XML_ATTRIBUTE_REQUIRED, |
| 178 | XML_ATTRIBUTE_IMPLIED, |
| 179 | XML_ATTRIBUTE_FIXED |
| 180 | } xmlAttributeDefault; |
| 181 | |
Daniel Veillard | bed7b05 | 2001-05-19 14:59:49 +0000 | [diff] [blame] | 182 | /** |
| 183 | * xmlEnumeration: |
| 184 | * |
Daniel Veillard | 61f2617 | 2002-03-12 18:46:39 +0000 | [diff] [blame] | 185 | * List structure used when there is an enumeration in DTDs. |
Daniel Veillard | bed7b05 | 2001-05-19 14:59:49 +0000 | [diff] [blame] | 186 | */ |
| 187 | |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 188 | typedef struct _xmlEnumeration xmlEnumeration; |
| 189 | typedef xmlEnumeration *xmlEnumerationPtr; |
| 190 | struct _xmlEnumeration { |
| 191 | struct _xmlEnumeration *next; /* next one */ |
| 192 | const xmlChar *name; /* Enumeration name */ |
| 193 | }; |
| 194 | |
Daniel Veillard | bed7b05 | 2001-05-19 14:59:49 +0000 | [diff] [blame] | 195 | /** |
| 196 | * xmlAttribute: |
| 197 | * |
Daniel Veillard | 61f2617 | 2002-03-12 18:46:39 +0000 | [diff] [blame] | 198 | * An Attribute declaration in a DTD. |
Daniel Veillard | bed7b05 | 2001-05-19 14:59:49 +0000 | [diff] [blame] | 199 | */ |
| 200 | |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 201 | typedef struct _xmlAttribute xmlAttribute; |
| 202 | typedef xmlAttribute *xmlAttributePtr; |
| 203 | struct _xmlAttribute { |
Daniel Veillard | 0ec9863 | 2001-11-14 15:04:32 +0000 | [diff] [blame] | 204 | void *_private; /* application data */ |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 205 | xmlElementType type; /* XML_ATTRIBUTE_DECL, must be second ! */ |
| 206 | const xmlChar *name; /* Attribute name */ |
| 207 | struct _xmlNode *children; /* NULL */ |
| 208 | struct _xmlNode *last; /* NULL */ |
| 209 | struct _xmlDtd *parent; /* -> DTD */ |
| 210 | struct _xmlNode *next; /* next sibling link */ |
| 211 | struct _xmlNode *prev; /* previous sibling link */ |
| 212 | struct _xmlDoc *doc; /* the containing document */ |
| 213 | |
| 214 | struct _xmlAttribute *nexth; /* next in hash table */ |
| 215 | xmlAttributeType atype; /* The attribute type */ |
| 216 | xmlAttributeDefault def; /* the default */ |
| 217 | const xmlChar *defaultValue; /* or the default value */ |
| 218 | xmlEnumerationPtr tree; /* or the enumeration tree if any */ |
| 219 | const xmlChar *prefix; /* the namespace prefix if any */ |
| 220 | const xmlChar *elem; /* Element holding the attribute */ |
| 221 | }; |
| 222 | |
Daniel Veillard | bed7b05 | 2001-05-19 14:59:49 +0000 | [diff] [blame] | 223 | /** |
| 224 | * xmlElementContentType: |
| 225 | * |
Daniel Veillard | 61f2617 | 2002-03-12 18:46:39 +0000 | [diff] [blame] | 226 | * Possible definitions of element content types. |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 227 | */ |
| 228 | typedef enum { |
| 229 | XML_ELEMENT_CONTENT_PCDATA = 1, |
| 230 | XML_ELEMENT_CONTENT_ELEMENT, |
| 231 | XML_ELEMENT_CONTENT_SEQ, |
| 232 | XML_ELEMENT_CONTENT_OR |
| 233 | } xmlElementContentType; |
| 234 | |
Daniel Veillard | bed7b05 | 2001-05-19 14:59:49 +0000 | [diff] [blame] | 235 | /** |
| 236 | * xmlElementContentOccur: |
| 237 | * |
Daniel Veillard | 61f2617 | 2002-03-12 18:46:39 +0000 | [diff] [blame] | 238 | * Possible definitions of element content occurrences. |
Daniel Veillard | bed7b05 | 2001-05-19 14:59:49 +0000 | [diff] [blame] | 239 | */ |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 240 | typedef enum { |
| 241 | XML_ELEMENT_CONTENT_ONCE = 1, |
| 242 | XML_ELEMENT_CONTENT_OPT, |
| 243 | XML_ELEMENT_CONTENT_MULT, |
| 244 | XML_ELEMENT_CONTENT_PLUS |
| 245 | } xmlElementContentOccur; |
| 246 | |
Daniel Veillard | bed7b05 | 2001-05-19 14:59:49 +0000 | [diff] [blame] | 247 | /** |
| 248 | * xmlElementContent: |
| 249 | * |
Daniel Veillard | 61f2617 | 2002-03-12 18:46:39 +0000 | [diff] [blame] | 250 | * An XML Element content as stored after parsing an element definition |
Daniel Veillard | bed7b05 | 2001-05-19 14:59:49 +0000 | [diff] [blame] | 251 | * in a DTD. |
| 252 | */ |
| 253 | |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 254 | typedef struct _xmlElementContent xmlElementContent; |
| 255 | typedef xmlElementContent *xmlElementContentPtr; |
| 256 | struct _xmlElementContent { |
| 257 | xmlElementContentType type; /* PCDATA, ELEMENT, SEQ or OR */ |
| 258 | xmlElementContentOccur ocur; /* ONCE, OPT, MULT or PLUS */ |
Daniel Veillard | be480fb | 2001-11-08 23:36:42 +0000 | [diff] [blame] | 259 | const xmlChar *name; /* Element name */ |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 260 | struct _xmlElementContent *c1; /* first child */ |
| 261 | struct _xmlElementContent *c2; /* second child */ |
Daniel Veillard | dab4cb3 | 2001-04-20 13:03:48 +0000 | [diff] [blame] | 262 | struct _xmlElementContent *parent; /* parent */ |
Daniel Veillard | a9b66d0 | 2002-12-11 14:23:49 +0000 | [diff] [blame] | 263 | const xmlChar *prefix; /* Namespace prefix */ |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 264 | }; |
| 265 | |
Daniel Veillard | bed7b05 | 2001-05-19 14:59:49 +0000 | [diff] [blame] | 266 | /** |
| 267 | * xmlElementTypeVal: |
| 268 | * |
Daniel Veillard | 61f2617 | 2002-03-12 18:46:39 +0000 | [diff] [blame] | 269 | * The different possibilities for an element content type. |
Daniel Veillard | bed7b05 | 2001-05-19 14:59:49 +0000 | [diff] [blame] | 270 | */ |
| 271 | |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 272 | typedef enum { |
Daniel Veillard | a10efa8 | 2001-04-18 13:09:01 +0000 | [diff] [blame] | 273 | XML_ELEMENT_TYPE_UNDEFINED = 0, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 274 | XML_ELEMENT_TYPE_EMPTY = 1, |
| 275 | XML_ELEMENT_TYPE_ANY, |
| 276 | XML_ELEMENT_TYPE_MIXED, |
| 277 | XML_ELEMENT_TYPE_ELEMENT |
| 278 | } xmlElementTypeVal; |
| 279 | |
Daniel Veillard | aeb258a | 2002-09-13 14:48:12 +0000 | [diff] [blame] | 280 | #ifdef __cplusplus |
| 281 | } |
| 282 | #endif |
| 283 | #include <libxml/xmlregexp.h> |
| 284 | #ifdef __cplusplus |
| 285 | extern "C" { |
| 286 | #endif |
| 287 | |
Daniel Veillard | bed7b05 | 2001-05-19 14:59:49 +0000 | [diff] [blame] | 288 | /** |
| 289 | * xmlElement: |
| 290 | * |
Daniel Veillard | 61f2617 | 2002-03-12 18:46:39 +0000 | [diff] [blame] | 291 | * An XML Element declaration from a DTD. |
Daniel Veillard | bed7b05 | 2001-05-19 14:59:49 +0000 | [diff] [blame] | 292 | */ |
| 293 | |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 294 | typedef struct _xmlElement xmlElement; |
| 295 | typedef xmlElement *xmlElementPtr; |
| 296 | struct _xmlElement { |
Daniel Veillard | 0ec9863 | 2001-11-14 15:04:32 +0000 | [diff] [blame] | 297 | void *_private; /* application data */ |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 298 | xmlElementType type; /* XML_ELEMENT_DECL, must be second ! */ |
| 299 | const xmlChar *name; /* Element name */ |
| 300 | struct _xmlNode *children; /* NULL */ |
| 301 | struct _xmlNode *last; /* NULL */ |
| 302 | struct _xmlDtd *parent; /* -> DTD */ |
| 303 | struct _xmlNode *next; /* next sibling link */ |
| 304 | struct _xmlNode *prev; /* previous sibling link */ |
| 305 | struct _xmlDoc *doc; /* the containing document */ |
| 306 | |
| 307 | xmlElementTypeVal etype; /* The type */ |
| 308 | xmlElementContentPtr content; /* the allowed element content */ |
| 309 | xmlAttributePtr attributes; /* List of the declared attributes */ |
| 310 | const xmlChar *prefix; /* the namespace prefix if any */ |
Daniel Veillard | aeb258a | 2002-09-13 14:48:12 +0000 | [diff] [blame] | 311 | #ifdef LIBXML_REGEXP_ENABLED |
| 312 | xmlRegexpPtr contModel; /* the validating regexp */ |
| 313 | #else |
| 314 | void *contModel; |
| 315 | #endif |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 316 | }; |
| 317 | |
Daniel Veillard | bed7b05 | 2001-05-19 14:59:49 +0000 | [diff] [blame] | 318 | |
Daniel Veillard | 5e2dace | 2001-07-18 19:30:27 +0000 | [diff] [blame] | 319 | /** |
| 320 | * XML_LOCAL_NAMESPACE: |
| 321 | * |
Daniel Veillard | 61f2617 | 2002-03-12 18:46:39 +0000 | [diff] [blame] | 322 | * A namespace declaration node. |
Daniel Veillard | 5e2dace | 2001-07-18 19:30:27 +0000 | [diff] [blame] | 323 | */ |
Daniel Veillard | bed7b05 | 2001-05-19 14:59:49 +0000 | [diff] [blame] | 324 | #define XML_LOCAL_NAMESPACE XML_NAMESPACE_DECL |
| 325 | typedef xmlElementType xmlNsType; |
| 326 | |
| 327 | /** |
| 328 | * xmlNs: |
| 329 | * |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 330 | * An XML namespace. |
| 331 | * Note that prefix == NULL is valid, it defines the default namespace |
Daniel Veillard | d164092 | 2001-12-17 15:30:10 +0000 | [diff] [blame] | 332 | * within the subtree (until overridden). |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 333 | * |
Daniel Veillard | 61f2617 | 2002-03-12 18:46:39 +0000 | [diff] [blame] | 334 | * xmlNsType is unified with xmlElementType. |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 335 | */ |
| 336 | |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 337 | typedef struct _xmlNs xmlNs; |
| 338 | typedef xmlNs *xmlNsPtr; |
| 339 | struct _xmlNs { |
| 340 | struct _xmlNs *next; /* next Ns link for this node */ |
| 341 | xmlNsType type; /* global or local */ |
| 342 | const xmlChar *href; /* URL for the namespace */ |
| 343 | const xmlChar *prefix; /* prefix for the namespace */ |
PDT 2002 Aleksey Sanin | 8e8a703 | 2002-07-22 18:03:11 +0000 | [diff] [blame] | 344 | void *_private; /* application data */ |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 345 | }; |
| 346 | |
Daniel Veillard | bed7b05 | 2001-05-19 14:59:49 +0000 | [diff] [blame] | 347 | /** |
| 348 | * xmlDtd: |
| 349 | * |
Daniel Veillard | d164092 | 2001-12-17 15:30:10 +0000 | [diff] [blame] | 350 | * An XML DTD, as defined by <!DOCTYPE ... There is actually one for |
Daniel Veillard | 61f2617 | 2002-03-12 18:46:39 +0000 | [diff] [blame] | 351 | * the internal subset and for the external subset. |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 352 | */ |
| 353 | typedef struct _xmlDtd xmlDtd; |
| 354 | typedef xmlDtd *xmlDtdPtr; |
| 355 | struct _xmlDtd { |
Daniel Veillard | 0ec9863 | 2001-11-14 15:04:32 +0000 | [diff] [blame] | 356 | void *_private; /* application data */ |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 357 | xmlElementType type; /* XML_DTD_NODE, must be second ! */ |
| 358 | const xmlChar *name; /* Name of the DTD */ |
| 359 | struct _xmlNode *children; /* the value of the property link */ |
| 360 | struct _xmlNode *last; /* last child link */ |
| 361 | struct _xmlDoc *parent; /* child->parent link */ |
| 362 | struct _xmlNode *next; /* next sibling link */ |
| 363 | struct _xmlNode *prev; /* previous sibling link */ |
| 364 | struct _xmlDoc *doc; /* the containing document */ |
| 365 | |
| 366 | /* End of common part */ |
| 367 | void *notations; /* Hash table for notations if any */ |
| 368 | void *elements; /* Hash table for elements if any */ |
| 369 | void *attributes; /* Hash table for attributes if any */ |
| 370 | void *entities; /* Hash table for entities if any */ |
| 371 | const xmlChar *ExternalID; /* External identifier for PUBLIC DTD */ |
| 372 | const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC DTD */ |
| 373 | void *pentities; /* Hash table for param entities if any */ |
| 374 | }; |
| 375 | |
Daniel Veillard | bed7b05 | 2001-05-19 14:59:49 +0000 | [diff] [blame] | 376 | /** |
| 377 | * xmlAttr: |
| 378 | * |
Daniel Veillard | 61f2617 | 2002-03-12 18:46:39 +0000 | [diff] [blame] | 379 | * An attribute on an XML node. |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 380 | */ |
| 381 | typedef struct _xmlAttr xmlAttr; |
| 382 | typedef xmlAttr *xmlAttrPtr; |
| 383 | struct _xmlAttr { |
Daniel Veillard | 0ec9863 | 2001-11-14 15:04:32 +0000 | [diff] [blame] | 384 | void *_private; /* application data */ |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 385 | xmlElementType type; /* XML_ATTRIBUTE_NODE, must be second ! */ |
| 386 | const xmlChar *name; /* the name of the property */ |
| 387 | struct _xmlNode *children; /* the value of the property */ |
| 388 | struct _xmlNode *last; /* NULL */ |
| 389 | struct _xmlNode *parent; /* child->parent link */ |
| 390 | struct _xmlAttr *next; /* next sibling link */ |
| 391 | struct _xmlAttr *prev; /* previous sibling link */ |
| 392 | struct _xmlDoc *doc; /* the containing document */ |
| 393 | xmlNs *ns; /* pointer to the associated namespace */ |
| 394 | xmlAttributeType atype; /* the attribute type if validating */ |
Daniel Veillard | d885040 | 2003-10-10 14:24:12 +0000 | [diff] [blame] | 395 | void *psvi; /* for type/PSVI informations */ |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 396 | }; |
| 397 | |
Daniel Veillard | bed7b05 | 2001-05-19 14:59:49 +0000 | [diff] [blame] | 398 | /** |
| 399 | * xmlID: |
| 400 | * |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 401 | * An XML ID instance. |
| 402 | */ |
| 403 | |
| 404 | typedef struct _xmlID xmlID; |
| 405 | typedef xmlID *xmlIDPtr; |
| 406 | struct _xmlID { |
| 407 | struct _xmlID *next; /* next ID */ |
| 408 | const xmlChar *value; /* The ID name */ |
Daniel Veillard | d164092 | 2001-12-17 15:30:10 +0000 | [diff] [blame] | 409 | xmlAttrPtr attr; /* The attribute holding it */ |
Daniel Veillard | ea7751d | 2002-12-20 00:16:24 +0000 | [diff] [blame] | 410 | const xmlChar *name; /* The attribute if attr is not available */ |
| 411 | int lineno; /* The line number if attr is not available */ |
Daniel Veillard | 8d7b5c7 | 2003-11-15 18:24:36 +0000 | [diff] [blame] | 412 | struct _xmlDoc *doc; /* The document holding the ID */ |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 413 | }; |
| 414 | |
Daniel Veillard | bed7b05 | 2001-05-19 14:59:49 +0000 | [diff] [blame] | 415 | /** |
| 416 | * xmlRef: |
| 417 | * |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 418 | * An XML IDREF instance. |
| 419 | */ |
| 420 | |
| 421 | typedef struct _xmlRef xmlRef; |
| 422 | typedef xmlRef *xmlRefPtr; |
| 423 | struct _xmlRef { |
| 424 | struct _xmlRef *next; /* next Ref */ |
| 425 | const xmlChar *value; /* The Ref name */ |
Daniel Veillard | d164092 | 2001-12-17 15:30:10 +0000 | [diff] [blame] | 426 | xmlAttrPtr attr; /* The attribute holding it */ |
Daniel Veillard | ea7751d | 2002-12-20 00:16:24 +0000 | [diff] [blame] | 427 | const xmlChar *name; /* The attribute if attr is not available */ |
| 428 | int lineno; /* The line number if attr is not available */ |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 429 | }; |
| 430 | |
Daniel Veillard | bed7b05 | 2001-05-19 14:59:49 +0000 | [diff] [blame] | 431 | /** |
Daniel Veillard | f69bb4b | 2001-05-19 13:24:56 +0000 | [diff] [blame] | 432 | * xmlNode: |
| 433 | * |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 434 | * A node in an XML tree. |
| 435 | */ |
| 436 | typedef struct _xmlNode xmlNode; |
| 437 | typedef xmlNode *xmlNodePtr; |
| 438 | struct _xmlNode { |
Daniel Veillard | 0ec9863 | 2001-11-14 15:04:32 +0000 | [diff] [blame] | 439 | void *_private; /* application data */ |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 440 | xmlElementType type; /* type number, must be second ! */ |
| 441 | const xmlChar *name; /* the name of the node, or the entity */ |
| 442 | struct _xmlNode *children; /* parent->childs link */ |
| 443 | struct _xmlNode *last; /* last child link */ |
| 444 | struct _xmlNode *parent; /* child->parent link */ |
| 445 | struct _xmlNode *next; /* next sibling link */ |
| 446 | struct _xmlNode *prev; /* previous sibling link */ |
| 447 | struct _xmlDoc *doc; /* the containing document */ |
Daniel Veillard | cbaf399 | 2001-12-31 16:16:02 +0000 | [diff] [blame] | 448 | |
| 449 | /* End of common part */ |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 450 | xmlNs *ns; /* pointer to the associated namespace */ |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 451 | xmlChar *content; /* the content */ |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 452 | struct _xmlAttr *properties;/* properties list */ |
| 453 | xmlNs *nsDef; /* namespace definitions on this node */ |
Daniel Veillard | d885040 | 2003-10-10 14:24:12 +0000 | [diff] [blame] | 454 | void *psvi; /* for type/PSVI informations */ |
Daniel Veillard | 1d211e2 | 2003-10-20 22:32:39 +0000 | [diff] [blame] | 455 | unsigned short line; /* line number */ |
| 456 | unsigned short extra; /* extra data for XPath/XSLT */ |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 457 | }; |
| 458 | |
Daniel Veillard | 5e2dace | 2001-07-18 19:30:27 +0000 | [diff] [blame] | 459 | /** |
| 460 | * XML_GET_CONTENT: |
| 461 | * |
Daniel Veillard | 61f2617 | 2002-03-12 18:46:39 +0000 | [diff] [blame] | 462 | * Macro to extract the content pointer of a node. |
Daniel Veillard | 5e2dace | 2001-07-18 19:30:27 +0000 | [diff] [blame] | 463 | */ |
| 464 | #define XML_GET_CONTENT(n) \ |
Daniel Veillard | 566d4df | 2001-11-22 13:00:53 +0000 | [diff] [blame] | 465 | ((n)->type == XML_ELEMENT_NODE ? NULL : (n)->content) |
Daniel Veillard | 5e2dace | 2001-07-18 19:30:27 +0000 | [diff] [blame] | 466 | |
| 467 | /** |
| 468 | * XML_GET_LINE: |
| 469 | * |
Daniel Veillard | 61f2617 | 2002-03-12 18:46:39 +0000 | [diff] [blame] | 470 | * Macro to extract the line number of an element node. |
Daniel Veillard | 5e2dace | 2001-07-18 19:30:27 +0000 | [diff] [blame] | 471 | */ |
| 472 | #define XML_GET_LINE(n) \ |
Daniel Veillard | c76440f | 2003-11-26 20:39:47 +0000 | [diff] [blame] | 473 | (xmlGetLineNo(n)) |
Daniel Veillard | 7db3773 | 2001-07-12 01:20:08 +0000 | [diff] [blame] | 474 | |
Daniel Veillard | 40412cd | 2003-09-03 13:28:32 +0000 | [diff] [blame] | 475 | |
Daniel Veillard | bed7b05 | 2001-05-19 14:59:49 +0000 | [diff] [blame] | 476 | /** |
| 477 | * xmlDoc: |
| 478 | * |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 479 | * An XML document. |
| 480 | */ |
| 481 | typedef struct _xmlDoc xmlDoc; |
| 482 | typedef xmlDoc *xmlDocPtr; |
| 483 | struct _xmlDoc { |
Daniel Veillard | 0ec9863 | 2001-11-14 15:04:32 +0000 | [diff] [blame] | 484 | void *_private; /* application data */ |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 485 | xmlElementType type; /* XML_DOCUMENT_NODE, must be second ! */ |
| 486 | char *name; /* name/filename/URI of the document */ |
| 487 | struct _xmlNode *children; /* the document tree */ |
| 488 | struct _xmlNode *last; /* last child link */ |
| 489 | struct _xmlNode *parent; /* child->parent link */ |
| 490 | struct _xmlNode *next; /* next sibling link */ |
| 491 | struct _xmlNode *prev; /* previous sibling link */ |
| 492 | struct _xmlDoc *doc; /* autoreference to itself */ |
| 493 | |
| 494 | /* End of common part */ |
| 495 | int compression;/* level of zlib compression */ |
| 496 | int standalone; /* standalone document (no external refs) */ |
| 497 | struct _xmlDtd *intSubset; /* the document internal subset */ |
| 498 | struct _xmlDtd *extSubset; /* the document external subset */ |
| 499 | struct _xmlNs *oldNs; /* Global namespace, the old way */ |
| 500 | const xmlChar *version; /* the XML version string */ |
| 501 | const xmlChar *encoding; /* external initial encoding, if any */ |
| 502 | void *ids; /* Hash table for ID attributes if any */ |
| 503 | void *refs; /* Hash table for IDREFs attributes if any */ |
| 504 | const xmlChar *URL; /* The URI for that document */ |
| 505 | int charset; /* encoding of the in-memory content |
| 506 | actually an xmlCharEncoding */ |
Daniel Veillard | 40412cd | 2003-09-03 13:28:32 +0000 | [diff] [blame] | 507 | struct _xmlDict *dict; /* dict used to allocate names or NULL */ |
Daniel Veillard | d885040 | 2003-10-10 14:24:12 +0000 | [diff] [blame] | 508 | void *psvi; /* for type/PSVI informations */ |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 509 | }; |
| 510 | |
Kasimier T. Buchcik | bc0e3c6 | 2005-06-27 10:28:23 +0000 | [diff] [blame] | 511 | typedef struct _xmlDOMWrapCtxt xmlDOMWrapCtxt; |
| 512 | typedef xmlDOMWrapCtxt *xmlDOMWrapCtxtPtr; |
| 513 | struct _xmlDOMWrapCtxt { |
| 514 | void * _private; |
| 515 | }; |
| 516 | |
Daniel Veillard | bed7b05 | 2001-05-19 14:59:49 +0000 | [diff] [blame] | 517 | /** |
| 518 | * xmlChildrenNode: |
| 519 | * |
MST 2003 John Fleck | a0e7e93 | 2003-12-19 03:13:47 +0000 | [diff] [blame] | 520 | * Macro for compatibility naming layer with libxml1. Maps |
| 521 | * to "children." |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 522 | */ |
| 523 | #ifndef xmlChildrenNode |
| 524 | #define xmlChildrenNode children |
Daniel Veillard | bed7b05 | 2001-05-19 14:59:49 +0000 | [diff] [blame] | 525 | #endif |
| 526 | |
| 527 | /** |
| 528 | * xmlRootNode: |
| 529 | * |
MST 2003 John Fleck | a0e7e93 | 2003-12-19 03:13:47 +0000 | [diff] [blame] | 530 | * Macro for compatibility naming layer with libxml1. Maps |
| 531 | * to "children". |
Daniel Veillard | bed7b05 | 2001-05-19 14:59:49 +0000 | [diff] [blame] | 532 | */ |
| 533 | #ifndef xmlRootNode |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 534 | #define xmlRootNode children |
| 535 | #endif |
| 536 | |
| 537 | /* |
| 538 | * Variables. |
| 539 | */ |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 540 | |
Daniel Veillard | c00cda8 | 2003-04-07 10:22:39 +0000 | [diff] [blame] | 541 | /* |
| 542 | * Some helper functions |
| 543 | */ |
Daniel Veillard | 1f33c4d | 2005-07-10 21:38:31 +0000 | [diff] [blame] | 544 | #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || defined (LIBXML_HTML_ENABLED) |
Igor Zlatkovic | 76874e4 | 2003-08-25 09:05:12 +0000 | [diff] [blame] | 545 | XMLPUBFUN int XMLCALL |
| 546 | xmlValidateNCName (const xmlChar *value, |
Daniel Veillard | c00cda8 | 2003-04-07 10:22:39 +0000 | [diff] [blame] | 547 | int space); |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 548 | #endif |
| 549 | |
| 550 | #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 551 | XMLPUBFUN int XMLCALL |
| 552 | xmlValidateQName (const xmlChar *value, |
Daniel Veillard | c00cda8 | 2003-04-07 10:22:39 +0000 | [diff] [blame] | 553 | int space); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 554 | XMLPUBFUN int XMLCALL |
| 555 | xmlValidateName (const xmlChar *value, |
Daniel Veillard | c00cda8 | 2003-04-07 10:22:39 +0000 | [diff] [blame] | 556 | int space); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 557 | XMLPUBFUN int XMLCALL |
| 558 | xmlValidateNMToken (const xmlChar *value, |
Daniel Veillard | c00cda8 | 2003-04-07 10:22:39 +0000 | [diff] [blame] | 559 | int space); |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 560 | #endif |
Daniel Veillard | d431074 | 2003-02-18 21:12:46 +0000 | [diff] [blame] | 561 | |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 562 | XMLPUBFUN xmlChar * XMLCALL |
| 563 | xmlBuildQName (const xmlChar *ncname, |
Daniel Veillard | c00cda8 | 2003-04-07 10:22:39 +0000 | [diff] [blame] | 564 | const xmlChar *prefix, |
| 565 | xmlChar *memory, |
| 566 | int len); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 567 | XMLPUBFUN xmlChar * XMLCALL |
| 568 | xmlSplitQName2 (const xmlChar *name, |
Daniel Veillard | c00cda8 | 2003-04-07 10:22:39 +0000 | [diff] [blame] | 569 | xmlChar **prefix); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 570 | XMLPUBFUN const xmlChar * XMLCALL |
| 571 | xmlSplitQName3 (const xmlChar *name, |
Daniel Veillard | 8d73bcb | 2003-08-04 01:06:15 +0000 | [diff] [blame] | 572 | int *len); |
| 573 | |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 574 | /* |
| 575 | * Handling Buffers. |
| 576 | */ |
| 577 | |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 578 | XMLPUBFUN void XMLCALL |
| 579 | xmlSetBufferAllocationScheme(xmlBufferAllocationScheme scheme); |
| 580 | XMLPUBFUN xmlBufferAllocationScheme XMLCALL |
| 581 | xmlGetBufferAllocationScheme(void); |
Daniel Veillard | 56a4cb8 | 2001-03-24 17:00:36 +0000 | [diff] [blame] | 582 | |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 583 | XMLPUBFUN xmlBufferPtr XMLCALL |
| 584 | xmlBufferCreate (void); |
| 585 | XMLPUBFUN xmlBufferPtr XMLCALL |
| 586 | xmlBufferCreateSize (size_t size); |
Daniel Veillard | 5335055 | 2003-09-18 13:35:51 +0000 | [diff] [blame] | 587 | XMLPUBFUN xmlBufferPtr XMLCALL |
| 588 | xmlBufferCreateStatic (void *mem, |
| 589 | size_t size); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 590 | XMLPUBFUN int XMLCALL |
| 591 | xmlBufferResize (xmlBufferPtr buf, |
Daniel Veillard | 56a4cb8 | 2001-03-24 17:00:36 +0000 | [diff] [blame] | 592 | unsigned int size); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 593 | XMLPUBFUN void XMLCALL |
| 594 | xmlBufferFree (xmlBufferPtr buf); |
| 595 | XMLPUBFUN int XMLCALL |
| 596 | xmlBufferDump (FILE *file, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 597 | xmlBufferPtr buf); |
William M. Brack | a3215c7 | 2004-07-31 16:24:01 +0000 | [diff] [blame] | 598 | XMLPUBFUN int XMLCALL |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 599 | xmlBufferAdd (xmlBufferPtr buf, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 600 | const xmlChar *str, |
| 601 | int len); |
William M. Brack | a3215c7 | 2004-07-31 16:24:01 +0000 | [diff] [blame] | 602 | XMLPUBFUN int XMLCALL |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 603 | xmlBufferAddHead (xmlBufferPtr buf, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 604 | const xmlChar *str, |
| 605 | int len); |
William M. Brack | a3215c7 | 2004-07-31 16:24:01 +0000 | [diff] [blame] | 606 | XMLPUBFUN int XMLCALL |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 607 | xmlBufferCat (xmlBufferPtr buf, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 608 | const xmlChar *str); |
William M. Brack | a3215c7 | 2004-07-31 16:24:01 +0000 | [diff] [blame] | 609 | XMLPUBFUN int XMLCALL |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 610 | xmlBufferCCat (xmlBufferPtr buf, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 611 | const char *str); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 612 | XMLPUBFUN int XMLCALL |
| 613 | xmlBufferShrink (xmlBufferPtr buf, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 614 | unsigned int len); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 615 | XMLPUBFUN int XMLCALL |
| 616 | xmlBufferGrow (xmlBufferPtr buf, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 617 | unsigned int len); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 618 | XMLPUBFUN void XMLCALL |
| 619 | xmlBufferEmpty (xmlBufferPtr buf); |
| 620 | XMLPUBFUN const xmlChar* XMLCALL |
| 621 | xmlBufferContent (const xmlBufferPtr buf); |
| 622 | XMLPUBFUN void XMLCALL |
| 623 | xmlBufferSetAllocationScheme(xmlBufferPtr buf, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 624 | xmlBufferAllocationScheme scheme); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 625 | XMLPUBFUN int XMLCALL |
| 626 | xmlBufferLength (const xmlBufferPtr buf); |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 627 | |
| 628 | /* |
Daniel Veillard | 61f2617 | 2002-03-12 18:46:39 +0000 | [diff] [blame] | 629 | * Creating/freeing new structures. |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 630 | */ |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 631 | XMLPUBFUN xmlDtdPtr XMLCALL |
| 632 | xmlCreateIntSubset (xmlDocPtr doc, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 633 | const xmlChar *name, |
| 634 | const xmlChar *ExternalID, |
| 635 | const xmlChar *SystemID); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 636 | XMLPUBFUN xmlDtdPtr XMLCALL |
| 637 | xmlNewDtd (xmlDocPtr doc, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 638 | const xmlChar *name, |
| 639 | const xmlChar *ExternalID, |
| 640 | const xmlChar *SystemID); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 641 | XMLPUBFUN xmlDtdPtr XMLCALL |
| 642 | xmlGetIntSubset (xmlDocPtr doc); |
| 643 | XMLPUBFUN void XMLCALL |
| 644 | xmlFreeDtd (xmlDtdPtr cur); |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 645 | #ifdef LIBXML_LEGACY_ENABLED |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 646 | XMLPUBFUN xmlNsPtr XMLCALL |
| 647 | xmlNewGlobalNs (xmlDocPtr doc, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 648 | const xmlChar *href, |
| 649 | const xmlChar *prefix); |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 650 | #endif /* LIBXML_LEGACY_ENABLED */ |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 651 | XMLPUBFUN xmlNsPtr XMLCALL |
| 652 | xmlNewNs (xmlNodePtr node, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 653 | const xmlChar *href, |
| 654 | const xmlChar *prefix); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 655 | XMLPUBFUN void XMLCALL |
| 656 | xmlFreeNs (xmlNsPtr cur); |
| 657 | XMLPUBFUN void XMLCALL |
| 658 | xmlFreeNsList (xmlNsPtr cur); |
| 659 | XMLPUBFUN xmlDocPtr XMLCALL |
| 660 | xmlNewDoc (const xmlChar *version); |
| 661 | XMLPUBFUN void XMLCALL |
| 662 | xmlFreeDoc (xmlDocPtr cur); |
| 663 | XMLPUBFUN xmlAttrPtr XMLCALL |
| 664 | xmlNewDocProp (xmlDocPtr doc, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 665 | const xmlChar *name, |
| 666 | const xmlChar *value); |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 667 | #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || \ |
| 668 | defined(LIBXML_SCHEMAS_ENABLED) |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 669 | XMLPUBFUN xmlAttrPtr XMLCALL |
| 670 | xmlNewProp (xmlNodePtr node, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 671 | const xmlChar *name, |
| 672 | const xmlChar *value); |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 673 | #endif |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 674 | XMLPUBFUN xmlAttrPtr XMLCALL |
| 675 | xmlNewNsProp (xmlNodePtr node, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 676 | xmlNsPtr ns, |
| 677 | const xmlChar *name, |
| 678 | const xmlChar *value); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 679 | XMLPUBFUN xmlAttrPtr XMLCALL |
| 680 | xmlNewNsPropEatName (xmlNodePtr node, |
Daniel Veillard | 46de64e | 2002-05-29 08:21:33 +0000 | [diff] [blame] | 681 | xmlNsPtr ns, |
| 682 | xmlChar *name, |
| 683 | const xmlChar *value); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 684 | XMLPUBFUN void XMLCALL |
| 685 | xmlFreePropList (xmlAttrPtr cur); |
| 686 | XMLPUBFUN void XMLCALL |
| 687 | xmlFreeProp (xmlAttrPtr cur); |
| 688 | XMLPUBFUN xmlAttrPtr XMLCALL |
| 689 | xmlCopyProp (xmlNodePtr target, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 690 | xmlAttrPtr cur); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 691 | XMLPUBFUN xmlAttrPtr XMLCALL |
| 692 | xmlCopyPropList (xmlNodePtr target, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 693 | xmlAttrPtr cur); |
Daniel Veillard | 652327a | 2003-09-29 18:02:38 +0000 | [diff] [blame] | 694 | #ifdef LIBXML_TREE_ENABLED |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 695 | XMLPUBFUN xmlDtdPtr XMLCALL |
| 696 | xmlCopyDtd (xmlDtdPtr dtd); |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 697 | #endif /* LIBXML_TREE_ENABLED */ |
| 698 | #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 699 | XMLPUBFUN xmlDocPtr XMLCALL |
| 700 | xmlCopyDoc (xmlDocPtr doc, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 701 | int recursive); |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 702 | #endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */ |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 703 | /* |
Daniel Veillard | 61f2617 | 2002-03-12 18:46:39 +0000 | [diff] [blame] | 704 | * Creating new nodes. |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 705 | */ |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 706 | XMLPUBFUN xmlNodePtr XMLCALL |
| 707 | xmlNewDocNode (xmlDocPtr doc, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 708 | xmlNsPtr ns, |
| 709 | const xmlChar *name, |
| 710 | const xmlChar *content); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 711 | XMLPUBFUN xmlNodePtr XMLCALL |
| 712 | xmlNewDocNodeEatName (xmlDocPtr doc, |
Daniel Veillard | 46de64e | 2002-05-29 08:21:33 +0000 | [diff] [blame] | 713 | xmlNsPtr ns, |
| 714 | xmlChar *name, |
| 715 | const xmlChar *content); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 716 | XMLPUBFUN xmlNodePtr XMLCALL |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 717 | xmlNewNode (xmlNsPtr ns, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 718 | const xmlChar *name); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 719 | XMLPUBFUN xmlNodePtr XMLCALL |
| 720 | xmlNewNodeEatName (xmlNsPtr ns, |
Daniel Veillard | 46de64e | 2002-05-29 08:21:33 +0000 | [diff] [blame] | 721 | xmlChar *name); |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 722 | #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 723 | XMLPUBFUN xmlNodePtr XMLCALL |
| 724 | xmlNewChild (xmlNodePtr parent, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 725 | xmlNsPtr ns, |
| 726 | const xmlChar *name, |
| 727 | const xmlChar *content); |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 728 | #endif |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 729 | XMLPUBFUN xmlNodePtr XMLCALL |
| 730 | xmlNewDocText (xmlDocPtr doc, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 731 | const xmlChar *content); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 732 | XMLPUBFUN xmlNodePtr XMLCALL |
| 733 | xmlNewText (const xmlChar *content); |
| 734 | XMLPUBFUN xmlNodePtr XMLCALL |
Daniel Veillard | 03a53c3 | 2004-10-26 16:06:51 +0000 | [diff] [blame] | 735 | xmlNewDocPI (xmlDocPtr doc, |
| 736 | const xmlChar *name, |
| 737 | const xmlChar *content); |
| 738 | XMLPUBFUN xmlNodePtr XMLCALL |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 739 | xmlNewPI (const xmlChar *name, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 740 | const xmlChar *content); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 741 | XMLPUBFUN xmlNodePtr XMLCALL |
| 742 | xmlNewDocTextLen (xmlDocPtr doc, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 743 | const xmlChar *content, |
| 744 | int len); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 745 | XMLPUBFUN xmlNodePtr XMLCALL |
| 746 | xmlNewTextLen (const xmlChar *content, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 747 | int len); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 748 | XMLPUBFUN xmlNodePtr XMLCALL |
| 749 | xmlNewDocComment (xmlDocPtr doc, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 750 | const xmlChar *content); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 751 | XMLPUBFUN xmlNodePtr XMLCALL |
| 752 | xmlNewComment (const xmlChar *content); |
| 753 | XMLPUBFUN xmlNodePtr XMLCALL |
| 754 | xmlNewCDataBlock (xmlDocPtr doc, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 755 | const xmlChar *content, |
| 756 | int len); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 757 | XMLPUBFUN xmlNodePtr XMLCALL |
| 758 | xmlNewCharRef (xmlDocPtr doc, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 759 | const xmlChar *name); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 760 | XMLPUBFUN xmlNodePtr XMLCALL |
| 761 | xmlNewReference (xmlDocPtr doc, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 762 | const xmlChar *name); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 763 | XMLPUBFUN xmlNodePtr XMLCALL |
| 764 | xmlCopyNode (const xmlNodePtr node, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 765 | int recursive); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 766 | XMLPUBFUN xmlNodePtr XMLCALL |
| 767 | xmlDocCopyNode (const xmlNodePtr node, |
Daniel Veillard | 82daa81 | 2001-04-12 08:55:36 +0000 | [diff] [blame] | 768 | xmlDocPtr doc, |
| 769 | int recursive); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 770 | XMLPUBFUN xmlNodePtr XMLCALL |
Daniel Veillard | 03a53c3 | 2004-10-26 16:06:51 +0000 | [diff] [blame] | 771 | xmlDocCopyNodeList (xmlDocPtr doc, |
| 772 | const xmlNodePtr node); |
| 773 | XMLPUBFUN xmlNodePtr XMLCALL |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 774 | xmlCopyNodeList (const xmlNodePtr node); |
Daniel Veillard | 652327a | 2003-09-29 18:02:38 +0000 | [diff] [blame] | 775 | #ifdef LIBXML_TREE_ENABLED |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 776 | XMLPUBFUN xmlNodePtr XMLCALL |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 777 | xmlNewTextChild (xmlNodePtr parent, |
| 778 | xmlNsPtr ns, |
| 779 | const xmlChar *name, |
| 780 | const xmlChar *content); |
| 781 | XMLPUBFUN xmlNodePtr XMLCALL |
| 782 | xmlNewDocRawNode (xmlDocPtr doc, |
| 783 | xmlNsPtr ns, |
| 784 | const xmlChar *name, |
| 785 | const xmlChar *content); |
| 786 | XMLPUBFUN xmlNodePtr XMLCALL |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 787 | xmlNewDocFragment (xmlDocPtr doc); |
Daniel Veillard | 652327a | 2003-09-29 18:02:38 +0000 | [diff] [blame] | 788 | #endif /* LIBXML_TREE_ENABLED */ |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 789 | |
| 790 | /* |
Daniel Veillard | 61f2617 | 2002-03-12 18:46:39 +0000 | [diff] [blame] | 791 | * Navigating. |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 792 | */ |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 793 | XMLPUBFUN long XMLCALL |
| 794 | xmlGetLineNo (xmlNodePtr node); |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 795 | #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED) |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 796 | XMLPUBFUN xmlChar * XMLCALL |
| 797 | xmlGetNodePath (xmlNodePtr node); |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 798 | #endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED) */ |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 799 | XMLPUBFUN xmlNodePtr XMLCALL |
| 800 | xmlDocGetRootElement (xmlDocPtr doc); |
| 801 | XMLPUBFUN xmlNodePtr XMLCALL |
| 802 | xmlGetLastChild (xmlNodePtr parent); |
| 803 | XMLPUBFUN int XMLCALL |
| 804 | xmlNodeIsText (xmlNodePtr node); |
| 805 | XMLPUBFUN int XMLCALL |
| 806 | xmlIsBlankNode (xmlNodePtr node); |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 807 | |
| 808 | /* |
Daniel Veillard | 61f2617 | 2002-03-12 18:46:39 +0000 | [diff] [blame] | 809 | * Changing the structure. |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 810 | */ |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 811 | #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 812 | XMLPUBFUN xmlNodePtr XMLCALL |
| 813 | xmlDocSetRootElement (xmlDocPtr doc, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 814 | xmlNodePtr root); |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 815 | #endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) */ |
| 816 | #ifdef LIBXML_TREE_ENABLED |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 817 | XMLPUBFUN void XMLCALL |
| 818 | xmlNodeSetName (xmlNodePtr cur, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 819 | const xmlChar *name); |
Daniel Veillard | 652327a | 2003-09-29 18:02:38 +0000 | [diff] [blame] | 820 | #endif /* LIBXML_TREE_ENABLED */ |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 821 | XMLPUBFUN xmlNodePtr XMLCALL |
| 822 | xmlAddChild (xmlNodePtr parent, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 823 | xmlNodePtr cur); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 824 | XMLPUBFUN xmlNodePtr XMLCALL |
| 825 | xmlAddChildList (xmlNodePtr parent, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 826 | xmlNodePtr cur); |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 827 | #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 828 | XMLPUBFUN xmlNodePtr XMLCALL |
| 829 | xmlReplaceNode (xmlNodePtr old, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 830 | xmlNodePtr cur); |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 831 | #endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) */ |
| 832 | #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || \ |
| 833 | defined(LIBXML_SCHEMAS_ENABLED) |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 834 | XMLPUBFUN xmlNodePtr XMLCALL |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 835 | xmlAddPrevSibling (xmlNodePtr cur, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 836 | xmlNodePtr elem); |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 837 | #endif /* LIBXML_TREE_ENABLED || LIBXML_HTML_ENABLED || LIBXML_SCHEMAS_ENABLED */ |
Daniel Veillard | 652327a | 2003-09-29 18:02:38 +0000 | [diff] [blame] | 838 | XMLPUBFUN xmlNodePtr XMLCALL |
| 839 | xmlAddSibling (xmlNodePtr cur, |
| 840 | xmlNodePtr elem); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 841 | XMLPUBFUN xmlNodePtr XMLCALL |
| 842 | xmlAddNextSibling (xmlNodePtr cur, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 843 | xmlNodePtr elem); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 844 | XMLPUBFUN void XMLCALL |
| 845 | xmlUnlinkNode (xmlNodePtr cur); |
| 846 | XMLPUBFUN xmlNodePtr XMLCALL |
| 847 | xmlTextMerge (xmlNodePtr first, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 848 | xmlNodePtr second); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 849 | XMLPUBFUN int XMLCALL |
| 850 | xmlTextConcat (xmlNodePtr node, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 851 | const xmlChar *content, |
| 852 | int len); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 853 | XMLPUBFUN void XMLCALL |
| 854 | xmlFreeNodeList (xmlNodePtr cur); |
| 855 | XMLPUBFUN void XMLCALL |
| 856 | xmlFreeNode (xmlNodePtr cur); |
| 857 | XMLPUBFUN void XMLCALL |
| 858 | xmlSetTreeDoc (xmlNodePtr tree, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 859 | xmlDocPtr doc); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 860 | XMLPUBFUN void XMLCALL |
| 861 | xmlSetListDoc (xmlNodePtr list, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 862 | xmlDocPtr doc); |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 863 | /* |
Daniel Veillard | 61f2617 | 2002-03-12 18:46:39 +0000 | [diff] [blame] | 864 | * Namespaces. |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 865 | */ |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 866 | XMLPUBFUN xmlNsPtr XMLCALL |
| 867 | xmlSearchNs (xmlDocPtr doc, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 868 | xmlNodePtr node, |
| 869 | const xmlChar *nameSpace); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 870 | XMLPUBFUN xmlNsPtr XMLCALL |
| 871 | xmlSearchNsByHref (xmlDocPtr doc, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 872 | xmlNodePtr node, |
| 873 | const xmlChar *href); |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 874 | #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 875 | XMLPUBFUN xmlNsPtr * XMLCALL |
| 876 | xmlGetNsList (xmlDocPtr doc, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 877 | xmlNodePtr node); |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 878 | #endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) */ |
Daniel Veillard | 652327a | 2003-09-29 18:02:38 +0000 | [diff] [blame] | 879 | |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 880 | XMLPUBFUN void XMLCALL |
| 881 | xmlSetNs (xmlNodePtr node, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 882 | xmlNsPtr ns); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 883 | XMLPUBFUN xmlNsPtr XMLCALL |
| 884 | xmlCopyNamespace (xmlNsPtr cur); |
| 885 | XMLPUBFUN xmlNsPtr XMLCALL |
| 886 | xmlCopyNamespaceList (xmlNsPtr cur); |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 887 | |
| 888 | /* |
| 889 | * Changing the content. |
| 890 | */ |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 891 | #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED) |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 892 | XMLPUBFUN xmlAttrPtr XMLCALL |
| 893 | xmlSetProp (xmlNodePtr node, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 894 | const xmlChar *name, |
| 895 | const xmlChar *value); |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 896 | XMLPUBFUN xmlAttrPtr XMLCALL |
| 897 | xmlSetNsProp (xmlNodePtr node, |
| 898 | xmlNsPtr ns, |
| 899 | const xmlChar *name, |
| 900 | const xmlChar *value); |
| 901 | #endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED) */ |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 902 | XMLPUBFUN xmlChar * XMLCALL |
| 903 | xmlGetNoNsProp (xmlNodePtr node, |
Daniel Veillard | 71531f3 | 2003-02-05 13:19:53 +0000 | [diff] [blame] | 904 | const xmlChar *name); |
Daniel Veillard | 652327a | 2003-09-29 18:02:38 +0000 | [diff] [blame] | 905 | XMLPUBFUN xmlChar * XMLCALL |
| 906 | xmlGetProp (xmlNodePtr node, |
| 907 | const xmlChar *name); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 908 | XMLPUBFUN xmlAttrPtr XMLCALL |
| 909 | xmlHasProp (xmlNodePtr node, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 910 | const xmlChar *name); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 911 | XMLPUBFUN xmlAttrPtr XMLCALL |
| 912 | xmlHasNsProp (xmlNodePtr node, |
Daniel Veillard | e95e239 | 2001-06-06 10:46:28 +0000 | [diff] [blame] | 913 | const xmlChar *name, |
Daniel Veillard | ca2366a | 2001-06-11 12:09:01 +0000 | [diff] [blame] | 914 | const xmlChar *nameSpace); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 915 | XMLPUBFUN xmlChar * XMLCALL |
| 916 | xmlGetNsProp (xmlNodePtr node, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 917 | const xmlChar *name, |
| 918 | const xmlChar *nameSpace); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 919 | XMLPUBFUN xmlNodePtr XMLCALL |
| 920 | xmlStringGetNodeList (xmlDocPtr doc, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 921 | const xmlChar *value); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 922 | XMLPUBFUN xmlNodePtr XMLCALL |
| 923 | xmlStringLenGetNodeList (xmlDocPtr doc, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 924 | const xmlChar *value, |
| 925 | int len); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 926 | XMLPUBFUN xmlChar * XMLCALL |
| 927 | xmlNodeListGetString (xmlDocPtr doc, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 928 | xmlNodePtr list, |
| 929 | int inLine); |
Daniel Veillard | 652327a | 2003-09-29 18:02:38 +0000 | [diff] [blame] | 930 | #ifdef LIBXML_TREE_ENABLED |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 931 | XMLPUBFUN xmlChar * XMLCALL |
| 932 | xmlNodeListGetRawString (xmlDocPtr doc, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 933 | xmlNodePtr list, |
| 934 | int inLine); |
Daniel Veillard | 652327a | 2003-09-29 18:02:38 +0000 | [diff] [blame] | 935 | #endif /* LIBXML_TREE_ENABLED */ |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 936 | XMLPUBFUN void XMLCALL |
| 937 | xmlNodeSetContent (xmlNodePtr cur, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 938 | const xmlChar *content); |
Daniel Veillard | 652327a | 2003-09-29 18:02:38 +0000 | [diff] [blame] | 939 | #ifdef LIBXML_TREE_ENABLED |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 940 | XMLPUBFUN void XMLCALL |
| 941 | xmlNodeSetContentLen (xmlNodePtr cur, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 942 | const xmlChar *content, |
| 943 | int len); |
Daniel Veillard | 652327a | 2003-09-29 18:02:38 +0000 | [diff] [blame] | 944 | #endif /* LIBXML_TREE_ENABLED */ |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 945 | XMLPUBFUN void XMLCALL |
| 946 | xmlNodeAddContent (xmlNodePtr cur, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 947 | const xmlChar *content); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 948 | XMLPUBFUN void XMLCALL |
| 949 | xmlNodeAddContentLen (xmlNodePtr cur, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 950 | const xmlChar *content, |
| 951 | int len); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 952 | XMLPUBFUN xmlChar * XMLCALL |
| 953 | xmlNodeGetContent (xmlNodePtr cur); |
Daniel Veillard | 7869729 | 2003-10-19 20:44:43 +0000 | [diff] [blame] | 954 | XMLPUBFUN int XMLCALL |
| 955 | xmlNodeBufGetContent (xmlBufferPtr buffer, |
| 956 | xmlNodePtr cur); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 957 | XMLPUBFUN xmlChar * XMLCALL |
| 958 | xmlNodeGetLang (xmlNodePtr cur); |
Daniel Veillard | 652327a | 2003-09-29 18:02:38 +0000 | [diff] [blame] | 959 | XMLPUBFUN int XMLCALL |
| 960 | xmlNodeGetSpacePreserve (xmlNodePtr cur); |
| 961 | #ifdef LIBXML_TREE_ENABLED |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 962 | XMLPUBFUN void XMLCALL |
| 963 | xmlNodeSetLang (xmlNodePtr cur, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 964 | const xmlChar *lang); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 965 | XMLPUBFUN void XMLCALL |
| 966 | xmlNodeSetSpacePreserve (xmlNodePtr cur, |
Daniel Veillard | d164092 | 2001-12-17 15:30:10 +0000 | [diff] [blame] | 967 | int val); |
Daniel Veillard | 652327a | 2003-09-29 18:02:38 +0000 | [diff] [blame] | 968 | #endif /* LIBXML_TREE_ENABLED */ |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 969 | XMLPUBFUN xmlChar * XMLCALL |
| 970 | xmlNodeGetBase (xmlDocPtr doc, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 971 | xmlNodePtr cur); |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 972 | #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 973 | XMLPUBFUN void XMLCALL |
| 974 | xmlNodeSetBase (xmlNodePtr cur, |
Daniel Veillard | f85ce8e | 2003-09-22 10:24:45 +0000 | [diff] [blame] | 975 | const xmlChar *uri); |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 976 | #endif |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 977 | |
| 978 | /* |
| 979 | * Removing content. |
| 980 | */ |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 981 | XMLPUBFUN int XMLCALL |
| 982 | xmlRemoveProp (xmlAttrPtr cur); |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 983 | #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 984 | XMLPUBFUN int XMLCALL |
| 985 | xmlUnsetNsProp (xmlNodePtr node, |
Daniel Veillard | 9403a04 | 2001-05-28 11:00:53 +0000 | [diff] [blame] | 986 | xmlNsPtr ns, |
| 987 | const xmlChar *name); |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 988 | XMLPUBFUN int XMLCALL |
| 989 | xmlUnsetProp (xmlNodePtr node, |
| 990 | const xmlChar *name); |
| 991 | #endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */ |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 992 | |
| 993 | /* |
Daniel Veillard | 61f2617 | 2002-03-12 18:46:39 +0000 | [diff] [blame] | 994 | * Internal, don't use. |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 995 | */ |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 996 | XMLPUBFUN void XMLCALL |
| 997 | xmlBufferWriteCHAR (xmlBufferPtr buf, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 998 | const xmlChar *string); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 999 | XMLPUBFUN void XMLCALL |
| 1000 | xmlBufferWriteChar (xmlBufferPtr buf, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 1001 | const char *string); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 1002 | XMLPUBFUN void XMLCALL |
| 1003 | xmlBufferWriteQuotedString(xmlBufferPtr buf, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 1004 | const xmlChar *string); |
| 1005 | |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 1006 | #ifdef LIBXML_OUTPUT_ENABLED |
William M. Brack | a9c612c | 2004-02-01 10:04:05 +0000 | [diff] [blame] | 1007 | XMLPUBFUN void xmlAttrSerializeTxtContent(xmlBufferPtr buf, |
| 1008 | xmlDocPtr doc, |
| 1009 | xmlAttrPtr attr, |
| 1010 | const xmlChar *string); |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 1011 | #endif /* LIBXML_OUTPUT_ENABLED */ |
William M. Brack | a9c612c | 2004-02-01 10:04:05 +0000 | [diff] [blame] | 1012 | |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 1013 | #ifdef LIBXML_TREE_ENABLED |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 1014 | /* |
Daniel Veillard | 61f2617 | 2002-03-12 18:46:39 +0000 | [diff] [blame] | 1015 | * Namespace handling. |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 1016 | */ |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 1017 | XMLPUBFUN int XMLCALL |
| 1018 | xmlReconciliateNs (xmlDocPtr doc, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 1019 | xmlNodePtr tree); |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 1020 | #endif |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 1021 | |
Daniel Veillard | a9cce9c | 2003-09-29 13:20:24 +0000 | [diff] [blame] | 1022 | #ifdef LIBXML_OUTPUT_ENABLED |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 1023 | /* |
Daniel Veillard | 61f2617 | 2002-03-12 18:46:39 +0000 | [diff] [blame] | 1024 | * Saving. |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 1025 | */ |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 1026 | XMLPUBFUN void XMLCALL |
| 1027 | xmlDocDumpFormatMemory (xmlDocPtr cur, |
Daniel Veillard | 963d2ae | 2002-01-20 22:08:18 +0000 | [diff] [blame] | 1028 | xmlChar **mem, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 1029 | int *size, |
| 1030 | int format); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 1031 | XMLPUBFUN void XMLCALL |
| 1032 | xmlDocDumpMemory (xmlDocPtr cur, |
Daniel Veillard | 963d2ae | 2002-01-20 22:08:18 +0000 | [diff] [blame] | 1033 | xmlChar **mem, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 1034 | int *size); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 1035 | XMLPUBFUN void XMLCALL |
| 1036 | xmlDocDumpMemoryEnc (xmlDocPtr out_doc, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 1037 | xmlChar **doc_txt_ptr, |
| 1038 | int * doc_txt_len, |
| 1039 | const char *txt_encoding); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 1040 | XMLPUBFUN void XMLCALL |
| 1041 | xmlDocDumpFormatMemoryEnc(xmlDocPtr out_doc, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 1042 | xmlChar **doc_txt_ptr, |
| 1043 | int * doc_txt_len, |
| 1044 | const char *txt_encoding, |
| 1045 | int format); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 1046 | XMLPUBFUN int XMLCALL |
| 1047 | xmlDocFormatDump (FILE *f, |
Daniel Veillard | 9e41230 | 2002-06-10 15:59:44 +0000 | [diff] [blame] | 1048 | xmlDocPtr cur, |
| 1049 | int format); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 1050 | XMLPUBFUN int XMLCALL |
| 1051 | xmlDocDump (FILE *f, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 1052 | xmlDocPtr cur); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 1053 | XMLPUBFUN void XMLCALL |
| 1054 | xmlElemDump (FILE *f, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 1055 | xmlDocPtr doc, |
| 1056 | xmlNodePtr cur); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 1057 | XMLPUBFUN int XMLCALL |
| 1058 | xmlSaveFile (const char *filename, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 1059 | xmlDocPtr cur); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 1060 | XMLPUBFUN int XMLCALL |
| 1061 | xmlSaveFormatFile (const char *filename, |
Daniel Veillard | 67fee94 | 2001-04-26 18:59:03 +0000 | [diff] [blame] | 1062 | xmlDocPtr cur, |
| 1063 | int format); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 1064 | XMLPUBFUN int XMLCALL |
| 1065 | xmlNodeDump (xmlBufferPtr buf, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 1066 | xmlDocPtr doc, |
| 1067 | xmlNodePtr cur, |
| 1068 | int level, |
| 1069 | int format); |
| 1070 | |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 1071 | XMLPUBFUN int XMLCALL |
| 1072 | xmlSaveFileTo (xmlOutputBufferPtr buf, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 1073 | xmlDocPtr cur, |
| 1074 | const char *encoding); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 1075 | XMLPUBFUN int XMLCALL |
| 1076 | xmlSaveFormatFileTo (xmlOutputBufferPtr buf, |
CET 2001 Daniel Veillard | 5a37bde | 2001-11-01 14:31:22 +0000 | [diff] [blame] | 1077 | xmlDocPtr cur, |
| 1078 | const char *encoding, |
| 1079 | int format); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 1080 | XMLPUBFUN void XMLCALL |
| 1081 | xmlNodeDumpOutput (xmlOutputBufferPtr buf, |
CET 2001 Daniel Veillard | 5a37bde | 2001-11-01 14:31:22 +0000 | [diff] [blame] | 1082 | xmlDocPtr doc, |
| 1083 | xmlNodePtr cur, |
| 1084 | int level, |
| 1085 | int format, |
| 1086 | const char *encoding); |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 1087 | |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 1088 | XMLPUBFUN int XMLCALL |
| 1089 | xmlSaveFormatFileEnc (const char *filename, |
Daniel Veillard | d164092 | 2001-12-17 15:30:10 +0000 | [diff] [blame] | 1090 | xmlDocPtr cur, |
| 1091 | const char *encoding, |
| 1092 | int format); |
Daniel Veillard | f012a64 | 2001-07-23 19:10:52 +0000 | [diff] [blame] | 1093 | |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 1094 | XMLPUBFUN int XMLCALL |
| 1095 | xmlSaveFileEnc (const char *filename, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 1096 | xmlDocPtr cur, |
| 1097 | const char *encoding); |
| 1098 | |
Daniel Veillard | a9cce9c | 2003-09-29 13:20:24 +0000 | [diff] [blame] | 1099 | #endif /* LIBXML_OUTPUT_ENABLED */ |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 1100 | /* |
Daniel Veillard | d5c2f92 | 2002-11-21 14:10:52 +0000 | [diff] [blame] | 1101 | * XHTML |
| 1102 | */ |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 1103 | XMLPUBFUN int XMLCALL |
| 1104 | xmlIsXHTML (const xmlChar *systemID, |
Daniel Veillard | d5c2f92 | 2002-11-21 14:10:52 +0000 | [diff] [blame] | 1105 | const xmlChar *publicID); |
| 1106 | |
| 1107 | /* |
Daniel Veillard | 61f2617 | 2002-03-12 18:46:39 +0000 | [diff] [blame] | 1108 | * Compression. |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 1109 | */ |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 1110 | XMLPUBFUN int XMLCALL |
| 1111 | xmlGetDocCompressMode (xmlDocPtr doc); |
| 1112 | XMLPUBFUN void XMLCALL |
| 1113 | xmlSetDocCompressMode (xmlDocPtr doc, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 1114 | int mode); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 1115 | XMLPUBFUN int XMLCALL |
| 1116 | xmlGetCompressMode (void); |
| 1117 | XMLPUBFUN void XMLCALL |
| 1118 | xmlSetCompressMode (int mode); |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 1119 | |
Kasimier T. Buchcik | bc0e3c6 | 2005-06-27 10:28:23 +0000 | [diff] [blame] | 1120 | /* |
| 1121 | * DOM-wrapper helper functions. |
| 1122 | */ |
Kasimier T. Buchcik | 4d9c948 | 2005-06-27 15:04:46 +0000 | [diff] [blame] | 1123 | XMLPUBFUN xmlDOMWrapCtxtPtr XMLCALL |
| 1124 | xmlDOMWrapNewCtxt (void); |
| 1125 | XMLPUBFUN void XMLCALL |
| 1126 | xmlDOMWrapFreeCtxt (xmlDOMWrapCtxtPtr ctxt); |
Kasimier T. Buchcik | bc0e3c6 | 2005-06-27 10:28:23 +0000 | [diff] [blame] | 1127 | XMLPUBFUN int XMLCALL |
| 1128 | xmlDOMWrapReconcileNamespaces(xmlDOMWrapCtxtPtr ctxt, |
| 1129 | xmlNodePtr elem, |
| 1130 | int options); |
| 1131 | XMLPUBFUN int XMLCALL |
| 1132 | xmlDOMWrapAdoptNode (xmlDOMWrapCtxtPtr ctxt, |
| 1133 | xmlDocPtr sourceDoc, |
| 1134 | xmlNodePtr node, |
| 1135 | xmlDocPtr destDoc, |
| 1136 | xmlNodePtr destParent, |
| 1137 | int options); |
| 1138 | XMLPUBFUN int XMLCALL |
| 1139 | xmlDOMWrapRemoveNode (xmlDOMWrapCtxtPtr ctxt, |
| 1140 | xmlDocPtr doc, |
| 1141 | xmlNodePtr node, |
| 1142 | int options); |
Kasimier T. Buchcik | a81d919 | 2006-02-03 16:37:44 +0000 | [diff] [blame] | 1143 | XMLPUBFUN int XMLCALL |
| 1144 | xmlDOMWrapCloneNode (xmlDOMWrapCtxtPtr ctxt, |
| 1145 | xmlDocPtr sourceDoc, |
| 1146 | xmlNodePtr node, |
| 1147 | xmlNodePtr *clonedNode, |
| 1148 | xmlDocPtr destDoc, |
| 1149 | xmlNodePtr destParent, |
| 1150 | int deep, |
| 1151 | int options); |
Kasimier T. Buchcik | bc0e3c6 | 2005-06-27 10:28:23 +0000 | [diff] [blame] | 1152 | |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 1153 | #ifdef __cplusplus |
| 1154 | } |
| 1155 | #endif |
Daniel Veillard | 6c4ffaf | 2002-02-11 08:54:05 +0000 | [diff] [blame] | 1156 | #ifndef __XML_PARSER_H__ |
| 1157 | #include <libxml/xmlmemory.h> |
| 1158 | #endif |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 1159 | |
| 1160 | #endif /* __XML_TREE_H__ */ |
| 1161 | |