blob: b1625745cc5032760afdab8414b8f1b9292de17a [file] [log] [blame]
Owen Taylor3473f882001-02-23 17:55:21 +00001/*
Daniel Veillardbe586972003-11-18 20:56:51 +00002 * 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 Taylor3473f882001-02-23 17:55:21 +00006 *
Daniel Veillardbe586972003-11-18 20:56:51 +00007 * Copy: See Copyright for the status of this software.
Owen Taylor3473f882001-02-23 17:55:21 +00008 *
Daniel Veillardbe586972003-11-18 20:56:51 +00009 * Author: Daniel Veillard
Owen Taylor3473f882001-02-23 17:55:21 +000010 */
11
12#ifndef __XML_TREE_H__
13#define __XML_TREE_H__
14
15#include <stdio.h>
16#include <libxml/xmlversion.h>
William M. Bracka2e844a2004-01-06 11:52:13 +000017#include <libxml/xmlstring.h>
Igor Zlatkovic7ae91bc2002-11-08 17:18:52 +000018
Owen Taylor3473f882001-02-23 17:55:21 +000019#ifdef __cplusplus
20extern "C" {
21#endif
22
Daniel Veillard8bdb91d2001-10-31 17:52:43 +000023/*
24 * Some of the basic types pointer to structures:
25 */
26/* xmlIO.h */
27typedef struct _xmlParserInputBuffer xmlParserInputBuffer;
28typedef xmlParserInputBuffer *xmlParserInputBufferPtr;
29
CET 2001 Daniel Veillard5a37bde2001-11-01 14:31:22 +000030typedef struct _xmlOutputBuffer xmlOutputBuffer;
31typedef xmlOutputBuffer *xmlOutputBufferPtr;
32
Daniel Veillard8bdb91d2001-10-31 17:52:43 +000033/* parser.h */
34typedef struct _xmlParserInput xmlParserInput;
35typedef xmlParserInput *xmlParserInputPtr;
36
37typedef struct _xmlParserCtxt xmlParserCtxt;
38typedef xmlParserCtxt *xmlParserCtxtPtr;
39
Daniel Veillard6c4ffaf2002-02-11 08:54:05 +000040typedef struct _xmlSAXLocator xmlSAXLocator;
41typedef xmlSAXLocator *xmlSAXLocatorPtr;
42
43typedef struct _xmlSAXHandler xmlSAXHandler;
44typedef xmlSAXHandler *xmlSAXHandlerPtr;
45
46/* entities.h */
47typedef struct _xmlEntity xmlEntity;
48typedef xmlEntity *xmlEntityPtr;
49
Daniel Veillard9d06d302002-01-22 18:15:52 +000050/**
51 * BASE_BUFFER_SIZE:
52 *
Daniel Veillard61f26172002-03-12 18:46:39 +000053 * default buffer size 4000.
Daniel Veillard9d06d302002-01-22 18:15:52 +000054 */
Daniel Veillard6155d8a2003-08-19 15:01:28 +000055#define BASE_BUFFER_SIZE 4096
Daniel Veillardd0463562001-10-13 09:15:48 +000056
Daniel Veillard5e2dace2001-07-18 19:30:27 +000057/**
Daniel Veillard465a0002005-08-22 12:07:04 +000058 * 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
64typedef 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 */
75typedef struct _xmlBuffer xmlBuffer;
76typedef xmlBuffer *xmlBufferPtr;
77struct _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 Veillard5e2dace2001-07-18 19:30:27 +000085 * XML_XML_NAMESPACE:
86 *
87 * This is the namespace for the special xml: prefix predefined in the
Daniel Veillard61f26172002-03-12 18:46:39 +000088 * XML Namespace specification.
Daniel Veillard5e2dace2001-07-18 19:30:27 +000089 */
Owen Taylor3473f882001-02-23 17:55:21 +000090#define XML_XML_NAMESPACE \
91 (const xmlChar *) "http://www.w3.org/XML/1998/namespace"
92
Daniel Veillard67f8b1c2004-04-09 21:51:49 +000093/**
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 Taylor3473f882001-02-23 17:55:21 +0000100/*
Daniel Veillard61f26172002-03-12 18:46:39 +0000101 * The different element types carried by an XML tree.
Owen Taylor3473f882001-02-23 17:55:21 +0000102 *
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 */
109typedef 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 Veillardeae522a2001-04-23 13:41:34 +0000130#ifdef LIBXML_DOCB_ENABLED
131 ,XML_DOCB_DOCUMENT_NODE= 21
Owen Taylor3473f882001-02-23 17:55:21 +0000132#endif
133} xmlElementType;
134
Owen Taylor3473f882001-02-23 17:55:21 +0000135
Daniel Veillardbed7b052001-05-19 14:59:49 +0000136/**
137 * xmlNotation:
138 *
Daniel Veillard61f26172002-03-12 18:46:39 +0000139 * A DTD Notation definition.
Owen Taylor3473f882001-02-23 17:55:21 +0000140 */
141
142typedef struct _xmlNotation xmlNotation;
143typedef xmlNotation *xmlNotationPtr;
144struct _xmlNotation {
Daniel Veillard9e7160d2001-03-18 23:17:47 +0000145 const xmlChar *name; /* Notation name */
Owen Taylor3473f882001-02-23 17:55:21 +0000146 const xmlChar *PublicID; /* Public identifier, if any */
147 const xmlChar *SystemID; /* System identifier, if any */
148};
149
Daniel Veillardbed7b052001-05-19 14:59:49 +0000150/**
151 * xmlAttributeType:
152 *
Daniel Veillard61f26172002-03-12 18:46:39 +0000153 * A DTD Attribute type definition.
Owen Taylor3473f882001-02-23 17:55:21 +0000154 */
155
156typedef 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 Veillardbed7b052001-05-19 14:59:49 +0000169/**
170 * xmlAttributeDefault:
171 *
Daniel Veillard61f26172002-03-12 18:46:39 +0000172 * A DTD Attribute default definition.
Daniel Veillardbed7b052001-05-19 14:59:49 +0000173 */
174
Owen Taylor3473f882001-02-23 17:55:21 +0000175typedef enum {
176 XML_ATTRIBUTE_NONE = 1,
177 XML_ATTRIBUTE_REQUIRED,
178 XML_ATTRIBUTE_IMPLIED,
179 XML_ATTRIBUTE_FIXED
180} xmlAttributeDefault;
181
Daniel Veillardbed7b052001-05-19 14:59:49 +0000182/**
183 * xmlEnumeration:
184 *
Daniel Veillard61f26172002-03-12 18:46:39 +0000185 * List structure used when there is an enumeration in DTDs.
Daniel Veillardbed7b052001-05-19 14:59:49 +0000186 */
187
Owen Taylor3473f882001-02-23 17:55:21 +0000188typedef struct _xmlEnumeration xmlEnumeration;
189typedef xmlEnumeration *xmlEnumerationPtr;
190struct _xmlEnumeration {
191 struct _xmlEnumeration *next; /* next one */
192 const xmlChar *name; /* Enumeration name */
193};
194
Daniel Veillardbed7b052001-05-19 14:59:49 +0000195/**
196 * xmlAttribute:
197 *
Daniel Veillard61f26172002-03-12 18:46:39 +0000198 * An Attribute declaration in a DTD.
Daniel Veillardbed7b052001-05-19 14:59:49 +0000199 */
200
Owen Taylor3473f882001-02-23 17:55:21 +0000201typedef struct _xmlAttribute xmlAttribute;
202typedef xmlAttribute *xmlAttributePtr;
203struct _xmlAttribute {
Daniel Veillard0ec98632001-11-14 15:04:32 +0000204 void *_private; /* application data */
Owen Taylor3473f882001-02-23 17:55:21 +0000205 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 Veillardbed7b052001-05-19 14:59:49 +0000223/**
224 * xmlElementContentType:
225 *
Daniel Veillard61f26172002-03-12 18:46:39 +0000226 * Possible definitions of element content types.
Owen Taylor3473f882001-02-23 17:55:21 +0000227 */
228typedef 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 Veillardbed7b052001-05-19 14:59:49 +0000235/**
236 * xmlElementContentOccur:
237 *
Daniel Veillard61f26172002-03-12 18:46:39 +0000238 * Possible definitions of element content occurrences.
Daniel Veillardbed7b052001-05-19 14:59:49 +0000239 */
Owen Taylor3473f882001-02-23 17:55:21 +0000240typedef 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 Veillardbed7b052001-05-19 14:59:49 +0000247/**
248 * xmlElementContent:
249 *
Daniel Veillard61f26172002-03-12 18:46:39 +0000250 * An XML Element content as stored after parsing an element definition
Daniel Veillardbed7b052001-05-19 14:59:49 +0000251 * in a DTD.
252 */
253
Owen Taylor3473f882001-02-23 17:55:21 +0000254typedef struct _xmlElementContent xmlElementContent;
255typedef xmlElementContent *xmlElementContentPtr;
256struct _xmlElementContent {
257 xmlElementContentType type; /* PCDATA, ELEMENT, SEQ or OR */
258 xmlElementContentOccur ocur; /* ONCE, OPT, MULT or PLUS */
Daniel Veillardbe480fb2001-11-08 23:36:42 +0000259 const xmlChar *name; /* Element name */
Owen Taylor3473f882001-02-23 17:55:21 +0000260 struct _xmlElementContent *c1; /* first child */
261 struct _xmlElementContent *c2; /* second child */
Daniel Veillarddab4cb32001-04-20 13:03:48 +0000262 struct _xmlElementContent *parent; /* parent */
Daniel Veillarda9b66d02002-12-11 14:23:49 +0000263 const xmlChar *prefix; /* Namespace prefix */
Owen Taylor3473f882001-02-23 17:55:21 +0000264};
265
Daniel Veillardbed7b052001-05-19 14:59:49 +0000266/**
267 * xmlElementTypeVal:
268 *
Daniel Veillard61f26172002-03-12 18:46:39 +0000269 * The different possibilities for an element content type.
Daniel Veillardbed7b052001-05-19 14:59:49 +0000270 */
271
Owen Taylor3473f882001-02-23 17:55:21 +0000272typedef enum {
Daniel Veillarda10efa82001-04-18 13:09:01 +0000273 XML_ELEMENT_TYPE_UNDEFINED = 0,
Owen Taylor3473f882001-02-23 17:55:21 +0000274 XML_ELEMENT_TYPE_EMPTY = 1,
275 XML_ELEMENT_TYPE_ANY,
276 XML_ELEMENT_TYPE_MIXED,
277 XML_ELEMENT_TYPE_ELEMENT
278} xmlElementTypeVal;
279
Daniel Veillardaeb258a2002-09-13 14:48:12 +0000280#ifdef __cplusplus
281}
282#endif
283#include <libxml/xmlregexp.h>
284#ifdef __cplusplus
285extern "C" {
286#endif
287
Daniel Veillardbed7b052001-05-19 14:59:49 +0000288/**
289 * xmlElement:
290 *
Daniel Veillard61f26172002-03-12 18:46:39 +0000291 * An XML Element declaration from a DTD.
Daniel Veillardbed7b052001-05-19 14:59:49 +0000292 */
293
Owen Taylor3473f882001-02-23 17:55:21 +0000294typedef struct _xmlElement xmlElement;
295typedef xmlElement *xmlElementPtr;
296struct _xmlElement {
Daniel Veillard0ec98632001-11-14 15:04:32 +0000297 void *_private; /* application data */
Owen Taylor3473f882001-02-23 17:55:21 +0000298 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 Veillardaeb258a2002-09-13 14:48:12 +0000311#ifdef LIBXML_REGEXP_ENABLED
312 xmlRegexpPtr contModel; /* the validating regexp */
313#else
314 void *contModel;
315#endif
Owen Taylor3473f882001-02-23 17:55:21 +0000316};
317
Daniel Veillardbed7b052001-05-19 14:59:49 +0000318
Daniel Veillard5e2dace2001-07-18 19:30:27 +0000319/**
320 * XML_LOCAL_NAMESPACE:
321 *
Daniel Veillard61f26172002-03-12 18:46:39 +0000322 * A namespace declaration node.
Daniel Veillard5e2dace2001-07-18 19:30:27 +0000323 */
Daniel Veillardbed7b052001-05-19 14:59:49 +0000324#define XML_LOCAL_NAMESPACE XML_NAMESPACE_DECL
325typedef xmlElementType xmlNsType;
326
327/**
328 * xmlNs:
329 *
Owen Taylor3473f882001-02-23 17:55:21 +0000330 * An XML namespace.
331 * Note that prefix == NULL is valid, it defines the default namespace
Daniel Veillardd1640922001-12-17 15:30:10 +0000332 * within the subtree (until overridden).
Owen Taylor3473f882001-02-23 17:55:21 +0000333 *
Daniel Veillard61f26172002-03-12 18:46:39 +0000334 * xmlNsType is unified with xmlElementType.
Owen Taylor3473f882001-02-23 17:55:21 +0000335 */
336
Owen Taylor3473f882001-02-23 17:55:21 +0000337typedef struct _xmlNs xmlNs;
338typedef xmlNs *xmlNsPtr;
339struct _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 Sanin8e8a7032002-07-22 18:03:11 +0000344 void *_private; /* application data */
Owen Taylor3473f882001-02-23 17:55:21 +0000345};
346
Daniel Veillardbed7b052001-05-19 14:59:49 +0000347/**
348 * xmlDtd:
349 *
Daniel Veillardd1640922001-12-17 15:30:10 +0000350 * An XML DTD, as defined by <!DOCTYPE ... There is actually one for
Daniel Veillard61f26172002-03-12 18:46:39 +0000351 * the internal subset and for the external subset.
Owen Taylor3473f882001-02-23 17:55:21 +0000352 */
353typedef struct _xmlDtd xmlDtd;
354typedef xmlDtd *xmlDtdPtr;
355struct _xmlDtd {
Daniel Veillard0ec98632001-11-14 15:04:32 +0000356 void *_private; /* application data */
Owen Taylor3473f882001-02-23 17:55:21 +0000357 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 Veillardbed7b052001-05-19 14:59:49 +0000376/**
377 * xmlAttr:
378 *
Daniel Veillard61f26172002-03-12 18:46:39 +0000379 * An attribute on an XML node.
Owen Taylor3473f882001-02-23 17:55:21 +0000380 */
381typedef struct _xmlAttr xmlAttr;
382typedef xmlAttr *xmlAttrPtr;
383struct _xmlAttr {
Daniel Veillard0ec98632001-11-14 15:04:32 +0000384 void *_private; /* application data */
Owen Taylor3473f882001-02-23 17:55:21 +0000385 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 Veillardd8850402003-10-10 14:24:12 +0000395 void *psvi; /* for type/PSVI informations */
Owen Taylor3473f882001-02-23 17:55:21 +0000396};
397
Daniel Veillardbed7b052001-05-19 14:59:49 +0000398/**
399 * xmlID:
400 *
Owen Taylor3473f882001-02-23 17:55:21 +0000401 * An XML ID instance.
402 */
403
404typedef struct _xmlID xmlID;
405typedef xmlID *xmlIDPtr;
406struct _xmlID {
407 struct _xmlID *next; /* next ID */
408 const xmlChar *value; /* The ID name */
Daniel Veillardd1640922001-12-17 15:30:10 +0000409 xmlAttrPtr attr; /* The attribute holding it */
Daniel Veillardea7751d2002-12-20 00:16:24 +0000410 const xmlChar *name; /* The attribute if attr is not available */
411 int lineno; /* The line number if attr is not available */
Daniel Veillard8d7b5c72003-11-15 18:24:36 +0000412 struct _xmlDoc *doc; /* The document holding the ID */
Owen Taylor3473f882001-02-23 17:55:21 +0000413};
414
Daniel Veillardbed7b052001-05-19 14:59:49 +0000415/**
416 * xmlRef:
417 *
Owen Taylor3473f882001-02-23 17:55:21 +0000418 * An XML IDREF instance.
419 */
420
421typedef struct _xmlRef xmlRef;
422typedef xmlRef *xmlRefPtr;
423struct _xmlRef {
424 struct _xmlRef *next; /* next Ref */
425 const xmlChar *value; /* The Ref name */
Daniel Veillardd1640922001-12-17 15:30:10 +0000426 xmlAttrPtr attr; /* The attribute holding it */
Daniel Veillardea7751d2002-12-20 00:16:24 +0000427 const xmlChar *name; /* The attribute if attr is not available */
428 int lineno; /* The line number if attr is not available */
Owen Taylor3473f882001-02-23 17:55:21 +0000429};
430
Daniel Veillardbed7b052001-05-19 14:59:49 +0000431/**
Daniel Veillardf69bb4b2001-05-19 13:24:56 +0000432 * xmlNode:
433 *
Owen Taylor3473f882001-02-23 17:55:21 +0000434 * A node in an XML tree.
435 */
436typedef struct _xmlNode xmlNode;
437typedef xmlNode *xmlNodePtr;
438struct _xmlNode {
Daniel Veillard0ec98632001-11-14 15:04:32 +0000439 void *_private; /* application data */
Owen Taylor3473f882001-02-23 17:55:21 +0000440 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 Veillardcbaf3992001-12-31 16:16:02 +0000448
449 /* End of common part */
Owen Taylor3473f882001-02-23 17:55:21 +0000450 xmlNs *ns; /* pointer to the associated namespace */
Owen Taylor3473f882001-02-23 17:55:21 +0000451 xmlChar *content; /* the content */
Owen Taylor3473f882001-02-23 17:55:21 +0000452 struct _xmlAttr *properties;/* properties list */
453 xmlNs *nsDef; /* namespace definitions on this node */
Daniel Veillardd8850402003-10-10 14:24:12 +0000454 void *psvi; /* for type/PSVI informations */
Daniel Veillard1d211e22003-10-20 22:32:39 +0000455 unsigned short line; /* line number */
456 unsigned short extra; /* extra data for XPath/XSLT */
Owen Taylor3473f882001-02-23 17:55:21 +0000457};
458
Daniel Veillard5e2dace2001-07-18 19:30:27 +0000459/**
460 * XML_GET_CONTENT:
461 *
Daniel Veillard61f26172002-03-12 18:46:39 +0000462 * Macro to extract the content pointer of a node.
Daniel Veillard5e2dace2001-07-18 19:30:27 +0000463 */
464#define XML_GET_CONTENT(n) \
Daniel Veillard566d4df2001-11-22 13:00:53 +0000465 ((n)->type == XML_ELEMENT_NODE ? NULL : (n)->content)
Daniel Veillard5e2dace2001-07-18 19:30:27 +0000466
467/**
468 * XML_GET_LINE:
469 *
Daniel Veillard61f26172002-03-12 18:46:39 +0000470 * Macro to extract the line number of an element node.
Daniel Veillard5e2dace2001-07-18 19:30:27 +0000471 */
472#define XML_GET_LINE(n) \
Daniel Veillardc76440f2003-11-26 20:39:47 +0000473 (xmlGetLineNo(n))
Daniel Veillard7db37732001-07-12 01:20:08 +0000474
Daniel Veillard40412cd2003-09-03 13:28:32 +0000475
Daniel Veillardbed7b052001-05-19 14:59:49 +0000476/**
477 * xmlDoc:
478 *
Owen Taylor3473f882001-02-23 17:55:21 +0000479 * An XML document.
480 */
481typedef struct _xmlDoc xmlDoc;
482typedef xmlDoc *xmlDocPtr;
483struct _xmlDoc {
Daniel Veillard0ec98632001-11-14 15:04:32 +0000484 void *_private; /* application data */
Owen Taylor3473f882001-02-23 17:55:21 +0000485 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 Veillard40412cd2003-09-03 13:28:32 +0000507 struct _xmlDict *dict; /* dict used to allocate names or NULL */
Daniel Veillardd8850402003-10-10 14:24:12 +0000508 void *psvi; /* for type/PSVI informations */
Owen Taylor3473f882001-02-23 17:55:21 +0000509};
510
Kasimier T. Buchcikbc0e3c62005-06-27 10:28:23 +0000511typedef struct _xmlDOMWrapCtxt xmlDOMWrapCtxt;
512typedef xmlDOMWrapCtxt *xmlDOMWrapCtxtPtr;
513struct _xmlDOMWrapCtxt {
514 void * _private;
515};
516
Daniel Veillardbed7b052001-05-19 14:59:49 +0000517/**
518 * xmlChildrenNode:
519 *
MST 2003 John Flecka0e7e932003-12-19 03:13:47 +0000520 * Macro for compatibility naming layer with libxml1. Maps
521 * to "children."
Owen Taylor3473f882001-02-23 17:55:21 +0000522 */
523#ifndef xmlChildrenNode
524#define xmlChildrenNode children
Daniel Veillardbed7b052001-05-19 14:59:49 +0000525#endif
526
527/**
528 * xmlRootNode:
529 *
MST 2003 John Flecka0e7e932003-12-19 03:13:47 +0000530 * Macro for compatibility naming layer with libxml1. Maps
531 * to "children".
Daniel Veillardbed7b052001-05-19 14:59:49 +0000532 */
533#ifndef xmlRootNode
Owen Taylor3473f882001-02-23 17:55:21 +0000534#define xmlRootNode children
535#endif
536
537/*
538 * Variables.
539 */
Owen Taylor3473f882001-02-23 17:55:21 +0000540
Daniel Veillardc00cda82003-04-07 10:22:39 +0000541/*
542 * Some helper functions
543 */
Daniel Veillard1f33c4d2005-07-10 21:38:31 +0000544#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || defined (LIBXML_HTML_ENABLED)
Igor Zlatkovic76874e42003-08-25 09:05:12 +0000545XMLPUBFUN int XMLCALL
546 xmlValidateNCName (const xmlChar *value,
Daniel Veillardc00cda82003-04-07 10:22:39 +0000547 int space);
William M. Brack21e4ef22005-01-02 09:53:13 +0000548#endif
549
550#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000551XMLPUBFUN int XMLCALL
552 xmlValidateQName (const xmlChar *value,
Daniel Veillardc00cda82003-04-07 10:22:39 +0000553 int space);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000554XMLPUBFUN int XMLCALL
555 xmlValidateName (const xmlChar *value,
Daniel Veillardc00cda82003-04-07 10:22:39 +0000556 int space);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000557XMLPUBFUN int XMLCALL
558 xmlValidateNMToken (const xmlChar *value,
Daniel Veillardc00cda82003-04-07 10:22:39 +0000559 int space);
William M. Brack21e4ef22005-01-02 09:53:13 +0000560#endif
Daniel Veillardd4310742003-02-18 21:12:46 +0000561
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000562XMLPUBFUN xmlChar * XMLCALL
563 xmlBuildQName (const xmlChar *ncname,
Daniel Veillardc00cda82003-04-07 10:22:39 +0000564 const xmlChar *prefix,
565 xmlChar *memory,
566 int len);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000567XMLPUBFUN xmlChar * XMLCALL
568 xmlSplitQName2 (const xmlChar *name,
Daniel Veillardc00cda82003-04-07 10:22:39 +0000569 xmlChar **prefix);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000570XMLPUBFUN const xmlChar * XMLCALL
571 xmlSplitQName3 (const xmlChar *name,
Daniel Veillard8d73bcb2003-08-04 01:06:15 +0000572 int *len);
573
Owen Taylor3473f882001-02-23 17:55:21 +0000574/*
575 * Handling Buffers.
576 */
577
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000578XMLPUBFUN void XMLCALL
579 xmlSetBufferAllocationScheme(xmlBufferAllocationScheme scheme);
580XMLPUBFUN xmlBufferAllocationScheme XMLCALL
581 xmlGetBufferAllocationScheme(void);
Daniel Veillard56a4cb82001-03-24 17:00:36 +0000582
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000583XMLPUBFUN xmlBufferPtr XMLCALL
584 xmlBufferCreate (void);
585XMLPUBFUN xmlBufferPtr XMLCALL
586 xmlBufferCreateSize (size_t size);
Daniel Veillard53350552003-09-18 13:35:51 +0000587XMLPUBFUN xmlBufferPtr XMLCALL
588 xmlBufferCreateStatic (void *mem,
589 size_t size);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000590XMLPUBFUN int XMLCALL
591 xmlBufferResize (xmlBufferPtr buf,
Daniel Veillard56a4cb82001-03-24 17:00:36 +0000592 unsigned int size);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000593XMLPUBFUN void XMLCALL
594 xmlBufferFree (xmlBufferPtr buf);
595XMLPUBFUN int XMLCALL
596 xmlBufferDump (FILE *file,
Owen Taylor3473f882001-02-23 17:55:21 +0000597 xmlBufferPtr buf);
William M. Bracka3215c72004-07-31 16:24:01 +0000598XMLPUBFUN int XMLCALL
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000599 xmlBufferAdd (xmlBufferPtr buf,
Owen Taylor3473f882001-02-23 17:55:21 +0000600 const xmlChar *str,
601 int len);
William M. Bracka3215c72004-07-31 16:24:01 +0000602XMLPUBFUN int XMLCALL
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000603 xmlBufferAddHead (xmlBufferPtr buf,
Owen Taylor3473f882001-02-23 17:55:21 +0000604 const xmlChar *str,
605 int len);
William M. Bracka3215c72004-07-31 16:24:01 +0000606XMLPUBFUN int XMLCALL
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000607 xmlBufferCat (xmlBufferPtr buf,
Owen Taylor3473f882001-02-23 17:55:21 +0000608 const xmlChar *str);
William M. Bracka3215c72004-07-31 16:24:01 +0000609XMLPUBFUN int XMLCALL
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000610 xmlBufferCCat (xmlBufferPtr buf,
Owen Taylor3473f882001-02-23 17:55:21 +0000611 const char *str);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000612XMLPUBFUN int XMLCALL
613 xmlBufferShrink (xmlBufferPtr buf,
Owen Taylor3473f882001-02-23 17:55:21 +0000614 unsigned int len);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000615XMLPUBFUN int XMLCALL
616 xmlBufferGrow (xmlBufferPtr buf,
Owen Taylor3473f882001-02-23 17:55:21 +0000617 unsigned int len);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000618XMLPUBFUN void XMLCALL
619 xmlBufferEmpty (xmlBufferPtr buf);
620XMLPUBFUN const xmlChar* XMLCALL
621 xmlBufferContent (const xmlBufferPtr buf);
622XMLPUBFUN void XMLCALL
623 xmlBufferSetAllocationScheme(xmlBufferPtr buf,
Owen Taylor3473f882001-02-23 17:55:21 +0000624 xmlBufferAllocationScheme scheme);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000625XMLPUBFUN int XMLCALL
626 xmlBufferLength (const xmlBufferPtr buf);
Owen Taylor3473f882001-02-23 17:55:21 +0000627
628/*
Daniel Veillard61f26172002-03-12 18:46:39 +0000629 * Creating/freeing new structures.
Owen Taylor3473f882001-02-23 17:55:21 +0000630 */
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000631XMLPUBFUN xmlDtdPtr XMLCALL
632 xmlCreateIntSubset (xmlDocPtr doc,
Owen Taylor3473f882001-02-23 17:55:21 +0000633 const xmlChar *name,
634 const xmlChar *ExternalID,
635 const xmlChar *SystemID);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000636XMLPUBFUN xmlDtdPtr XMLCALL
637 xmlNewDtd (xmlDocPtr doc,
Owen Taylor3473f882001-02-23 17:55:21 +0000638 const xmlChar *name,
639 const xmlChar *ExternalID,
640 const xmlChar *SystemID);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000641XMLPUBFUN xmlDtdPtr XMLCALL
642 xmlGetIntSubset (xmlDocPtr doc);
643XMLPUBFUN void XMLCALL
644 xmlFreeDtd (xmlDtdPtr cur);
William M. Brack21e4ef22005-01-02 09:53:13 +0000645#ifdef LIBXML_LEGACY_ENABLED
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000646XMLPUBFUN xmlNsPtr XMLCALL
647 xmlNewGlobalNs (xmlDocPtr doc,
Owen Taylor3473f882001-02-23 17:55:21 +0000648 const xmlChar *href,
649 const xmlChar *prefix);
William M. Brack21e4ef22005-01-02 09:53:13 +0000650#endif /* LIBXML_LEGACY_ENABLED */
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000651XMLPUBFUN xmlNsPtr XMLCALL
652 xmlNewNs (xmlNodePtr node,
Owen Taylor3473f882001-02-23 17:55:21 +0000653 const xmlChar *href,
654 const xmlChar *prefix);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000655XMLPUBFUN void XMLCALL
656 xmlFreeNs (xmlNsPtr cur);
657XMLPUBFUN void XMLCALL
658 xmlFreeNsList (xmlNsPtr cur);
659XMLPUBFUN xmlDocPtr XMLCALL
660 xmlNewDoc (const xmlChar *version);
661XMLPUBFUN void XMLCALL
662 xmlFreeDoc (xmlDocPtr cur);
663XMLPUBFUN xmlAttrPtr XMLCALL
664 xmlNewDocProp (xmlDocPtr doc,
Owen Taylor3473f882001-02-23 17:55:21 +0000665 const xmlChar *name,
666 const xmlChar *value);
William M. Brack21e4ef22005-01-02 09:53:13 +0000667#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || \
668 defined(LIBXML_SCHEMAS_ENABLED)
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000669XMLPUBFUN xmlAttrPtr XMLCALL
670 xmlNewProp (xmlNodePtr node,
Owen Taylor3473f882001-02-23 17:55:21 +0000671 const xmlChar *name,
672 const xmlChar *value);
William M. Brack21e4ef22005-01-02 09:53:13 +0000673#endif
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000674XMLPUBFUN xmlAttrPtr XMLCALL
675 xmlNewNsProp (xmlNodePtr node,
Owen Taylor3473f882001-02-23 17:55:21 +0000676 xmlNsPtr ns,
677 const xmlChar *name,
678 const xmlChar *value);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000679XMLPUBFUN xmlAttrPtr XMLCALL
680 xmlNewNsPropEatName (xmlNodePtr node,
Daniel Veillard46de64e2002-05-29 08:21:33 +0000681 xmlNsPtr ns,
682 xmlChar *name,
683 const xmlChar *value);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000684XMLPUBFUN void XMLCALL
685 xmlFreePropList (xmlAttrPtr cur);
686XMLPUBFUN void XMLCALL
687 xmlFreeProp (xmlAttrPtr cur);
688XMLPUBFUN xmlAttrPtr XMLCALL
689 xmlCopyProp (xmlNodePtr target,
Owen Taylor3473f882001-02-23 17:55:21 +0000690 xmlAttrPtr cur);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000691XMLPUBFUN xmlAttrPtr XMLCALL
692 xmlCopyPropList (xmlNodePtr target,
Owen Taylor3473f882001-02-23 17:55:21 +0000693 xmlAttrPtr cur);
Daniel Veillard652327a2003-09-29 18:02:38 +0000694#ifdef LIBXML_TREE_ENABLED
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000695XMLPUBFUN xmlDtdPtr XMLCALL
696 xmlCopyDtd (xmlDtdPtr dtd);
William M. Brack21e4ef22005-01-02 09:53:13 +0000697#endif /* LIBXML_TREE_ENABLED */
698#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000699XMLPUBFUN xmlDocPtr XMLCALL
700 xmlCopyDoc (xmlDocPtr doc,
Owen Taylor3473f882001-02-23 17:55:21 +0000701 int recursive);
William M. Brack21e4ef22005-01-02 09:53:13 +0000702#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
Owen Taylor3473f882001-02-23 17:55:21 +0000703/*
Daniel Veillard61f26172002-03-12 18:46:39 +0000704 * Creating new nodes.
Owen Taylor3473f882001-02-23 17:55:21 +0000705 */
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000706XMLPUBFUN xmlNodePtr XMLCALL
707 xmlNewDocNode (xmlDocPtr doc,
Owen Taylor3473f882001-02-23 17:55:21 +0000708 xmlNsPtr ns,
709 const xmlChar *name,
710 const xmlChar *content);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000711XMLPUBFUN xmlNodePtr XMLCALL
712 xmlNewDocNodeEatName (xmlDocPtr doc,
Daniel Veillard46de64e2002-05-29 08:21:33 +0000713 xmlNsPtr ns,
714 xmlChar *name,
715 const xmlChar *content);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000716XMLPUBFUN xmlNodePtr XMLCALL
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000717 xmlNewNode (xmlNsPtr ns,
Owen Taylor3473f882001-02-23 17:55:21 +0000718 const xmlChar *name);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000719XMLPUBFUN xmlNodePtr XMLCALL
720 xmlNewNodeEatName (xmlNsPtr ns,
Daniel Veillard46de64e2002-05-29 08:21:33 +0000721 xmlChar *name);
William M. Brack21e4ef22005-01-02 09:53:13 +0000722#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000723XMLPUBFUN xmlNodePtr XMLCALL
724 xmlNewChild (xmlNodePtr parent,
Owen Taylor3473f882001-02-23 17:55:21 +0000725 xmlNsPtr ns,
726 const xmlChar *name,
727 const xmlChar *content);
William M. Brack21e4ef22005-01-02 09:53:13 +0000728#endif
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000729XMLPUBFUN xmlNodePtr XMLCALL
730 xmlNewDocText (xmlDocPtr doc,
Owen Taylor3473f882001-02-23 17:55:21 +0000731 const xmlChar *content);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000732XMLPUBFUN xmlNodePtr XMLCALL
733 xmlNewText (const xmlChar *content);
734XMLPUBFUN xmlNodePtr XMLCALL
Daniel Veillard03a53c32004-10-26 16:06:51 +0000735 xmlNewDocPI (xmlDocPtr doc,
736 const xmlChar *name,
737 const xmlChar *content);
738XMLPUBFUN xmlNodePtr XMLCALL
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000739 xmlNewPI (const xmlChar *name,
Owen Taylor3473f882001-02-23 17:55:21 +0000740 const xmlChar *content);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000741XMLPUBFUN xmlNodePtr XMLCALL
742 xmlNewDocTextLen (xmlDocPtr doc,
Owen Taylor3473f882001-02-23 17:55:21 +0000743 const xmlChar *content,
744 int len);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000745XMLPUBFUN xmlNodePtr XMLCALL
746 xmlNewTextLen (const xmlChar *content,
Owen Taylor3473f882001-02-23 17:55:21 +0000747 int len);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000748XMLPUBFUN xmlNodePtr XMLCALL
749 xmlNewDocComment (xmlDocPtr doc,
Owen Taylor3473f882001-02-23 17:55:21 +0000750 const xmlChar *content);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000751XMLPUBFUN xmlNodePtr XMLCALL
752 xmlNewComment (const xmlChar *content);
753XMLPUBFUN xmlNodePtr XMLCALL
754 xmlNewCDataBlock (xmlDocPtr doc,
Owen Taylor3473f882001-02-23 17:55:21 +0000755 const xmlChar *content,
756 int len);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000757XMLPUBFUN xmlNodePtr XMLCALL
758 xmlNewCharRef (xmlDocPtr doc,
Owen Taylor3473f882001-02-23 17:55:21 +0000759 const xmlChar *name);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000760XMLPUBFUN xmlNodePtr XMLCALL
761 xmlNewReference (xmlDocPtr doc,
Owen Taylor3473f882001-02-23 17:55:21 +0000762 const xmlChar *name);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000763XMLPUBFUN xmlNodePtr XMLCALL
764 xmlCopyNode (const xmlNodePtr node,
Owen Taylor3473f882001-02-23 17:55:21 +0000765 int recursive);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000766XMLPUBFUN xmlNodePtr XMLCALL
767 xmlDocCopyNode (const xmlNodePtr node,
Daniel Veillard82daa812001-04-12 08:55:36 +0000768 xmlDocPtr doc,
769 int recursive);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000770XMLPUBFUN xmlNodePtr XMLCALL
Daniel Veillard03a53c32004-10-26 16:06:51 +0000771 xmlDocCopyNodeList (xmlDocPtr doc,
772 const xmlNodePtr node);
773XMLPUBFUN xmlNodePtr XMLCALL
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000774 xmlCopyNodeList (const xmlNodePtr node);
Daniel Veillard652327a2003-09-29 18:02:38 +0000775#ifdef LIBXML_TREE_ENABLED
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000776XMLPUBFUN xmlNodePtr XMLCALL
William M. Brack21e4ef22005-01-02 09:53:13 +0000777 xmlNewTextChild (xmlNodePtr parent,
778 xmlNsPtr ns,
779 const xmlChar *name,
780 const xmlChar *content);
781XMLPUBFUN xmlNodePtr XMLCALL
782 xmlNewDocRawNode (xmlDocPtr doc,
783 xmlNsPtr ns,
784 const xmlChar *name,
785 const xmlChar *content);
786XMLPUBFUN xmlNodePtr XMLCALL
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000787 xmlNewDocFragment (xmlDocPtr doc);
Daniel Veillard652327a2003-09-29 18:02:38 +0000788#endif /* LIBXML_TREE_ENABLED */
Owen Taylor3473f882001-02-23 17:55:21 +0000789
790/*
Daniel Veillard61f26172002-03-12 18:46:39 +0000791 * Navigating.
Owen Taylor3473f882001-02-23 17:55:21 +0000792 */
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000793XMLPUBFUN long XMLCALL
794 xmlGetLineNo (xmlNodePtr node);
William M. Brack21e4ef22005-01-02 09:53:13 +0000795#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED)
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000796XMLPUBFUN xmlChar * XMLCALL
797 xmlGetNodePath (xmlNodePtr node);
William M. Brack21e4ef22005-01-02 09:53:13 +0000798#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED) */
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000799XMLPUBFUN xmlNodePtr XMLCALL
800 xmlDocGetRootElement (xmlDocPtr doc);
801XMLPUBFUN xmlNodePtr XMLCALL
802 xmlGetLastChild (xmlNodePtr parent);
803XMLPUBFUN int XMLCALL
804 xmlNodeIsText (xmlNodePtr node);
805XMLPUBFUN int XMLCALL
806 xmlIsBlankNode (xmlNodePtr node);
Owen Taylor3473f882001-02-23 17:55:21 +0000807
808/*
Daniel Veillard61f26172002-03-12 18:46:39 +0000809 * Changing the structure.
Owen Taylor3473f882001-02-23 17:55:21 +0000810 */
William M. Brack21e4ef22005-01-02 09:53:13 +0000811#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000812XMLPUBFUN xmlNodePtr XMLCALL
813 xmlDocSetRootElement (xmlDocPtr doc,
Owen Taylor3473f882001-02-23 17:55:21 +0000814 xmlNodePtr root);
William M. Brack21e4ef22005-01-02 09:53:13 +0000815#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) */
816#ifdef LIBXML_TREE_ENABLED
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000817XMLPUBFUN void XMLCALL
818 xmlNodeSetName (xmlNodePtr cur,
Owen Taylor3473f882001-02-23 17:55:21 +0000819 const xmlChar *name);
Daniel Veillard652327a2003-09-29 18:02:38 +0000820#endif /* LIBXML_TREE_ENABLED */
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000821XMLPUBFUN xmlNodePtr XMLCALL
822 xmlAddChild (xmlNodePtr parent,
Owen Taylor3473f882001-02-23 17:55:21 +0000823 xmlNodePtr cur);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000824XMLPUBFUN xmlNodePtr XMLCALL
825 xmlAddChildList (xmlNodePtr parent,
Owen Taylor3473f882001-02-23 17:55:21 +0000826 xmlNodePtr cur);
William M. Brack21e4ef22005-01-02 09:53:13 +0000827#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000828XMLPUBFUN xmlNodePtr XMLCALL
829 xmlReplaceNode (xmlNodePtr old,
Owen Taylor3473f882001-02-23 17:55:21 +0000830 xmlNodePtr cur);
William M. Brack21e4ef22005-01-02 09:53:13 +0000831#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 Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000834XMLPUBFUN xmlNodePtr XMLCALL
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000835 xmlAddPrevSibling (xmlNodePtr cur,
Owen Taylor3473f882001-02-23 17:55:21 +0000836 xmlNodePtr elem);
William M. Brack21e4ef22005-01-02 09:53:13 +0000837#endif /* LIBXML_TREE_ENABLED || LIBXML_HTML_ENABLED || LIBXML_SCHEMAS_ENABLED */
Daniel Veillard652327a2003-09-29 18:02:38 +0000838XMLPUBFUN xmlNodePtr XMLCALL
839 xmlAddSibling (xmlNodePtr cur,
840 xmlNodePtr elem);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000841XMLPUBFUN xmlNodePtr XMLCALL
842 xmlAddNextSibling (xmlNodePtr cur,
Owen Taylor3473f882001-02-23 17:55:21 +0000843 xmlNodePtr elem);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000844XMLPUBFUN void XMLCALL
845 xmlUnlinkNode (xmlNodePtr cur);
846XMLPUBFUN xmlNodePtr XMLCALL
847 xmlTextMerge (xmlNodePtr first,
Owen Taylor3473f882001-02-23 17:55:21 +0000848 xmlNodePtr second);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000849XMLPUBFUN int XMLCALL
850 xmlTextConcat (xmlNodePtr node,
Owen Taylor3473f882001-02-23 17:55:21 +0000851 const xmlChar *content,
852 int len);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000853XMLPUBFUN void XMLCALL
854 xmlFreeNodeList (xmlNodePtr cur);
855XMLPUBFUN void XMLCALL
856 xmlFreeNode (xmlNodePtr cur);
857XMLPUBFUN void XMLCALL
858 xmlSetTreeDoc (xmlNodePtr tree,
Owen Taylor3473f882001-02-23 17:55:21 +0000859 xmlDocPtr doc);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000860XMLPUBFUN void XMLCALL
861 xmlSetListDoc (xmlNodePtr list,
Owen Taylor3473f882001-02-23 17:55:21 +0000862 xmlDocPtr doc);
Owen Taylor3473f882001-02-23 17:55:21 +0000863/*
Daniel Veillard61f26172002-03-12 18:46:39 +0000864 * Namespaces.
Owen Taylor3473f882001-02-23 17:55:21 +0000865 */
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000866XMLPUBFUN xmlNsPtr XMLCALL
867 xmlSearchNs (xmlDocPtr doc,
Owen Taylor3473f882001-02-23 17:55:21 +0000868 xmlNodePtr node,
869 const xmlChar *nameSpace);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000870XMLPUBFUN xmlNsPtr XMLCALL
871 xmlSearchNsByHref (xmlDocPtr doc,
Owen Taylor3473f882001-02-23 17:55:21 +0000872 xmlNodePtr node,
873 const xmlChar *href);
William M. Brack21e4ef22005-01-02 09:53:13 +0000874#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED)
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000875XMLPUBFUN xmlNsPtr * XMLCALL
876 xmlGetNsList (xmlDocPtr doc,
Owen Taylor3473f882001-02-23 17:55:21 +0000877 xmlNodePtr node);
William M. Brack21e4ef22005-01-02 09:53:13 +0000878#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) */
Daniel Veillard652327a2003-09-29 18:02:38 +0000879
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000880XMLPUBFUN void XMLCALL
881 xmlSetNs (xmlNodePtr node,
Owen Taylor3473f882001-02-23 17:55:21 +0000882 xmlNsPtr ns);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000883XMLPUBFUN xmlNsPtr XMLCALL
884 xmlCopyNamespace (xmlNsPtr cur);
885XMLPUBFUN xmlNsPtr XMLCALL
886 xmlCopyNamespaceList (xmlNsPtr cur);
Owen Taylor3473f882001-02-23 17:55:21 +0000887
888/*
889 * Changing the content.
890 */
William M. Brack21e4ef22005-01-02 09:53:13 +0000891#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED)
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000892XMLPUBFUN xmlAttrPtr XMLCALL
893 xmlSetProp (xmlNodePtr node,
Owen Taylor3473f882001-02-23 17:55:21 +0000894 const xmlChar *name,
895 const xmlChar *value);
William M. Brack21e4ef22005-01-02 09:53:13 +0000896XMLPUBFUN 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 Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000902XMLPUBFUN xmlChar * XMLCALL
903 xmlGetNoNsProp (xmlNodePtr node,
Daniel Veillard71531f32003-02-05 13:19:53 +0000904 const xmlChar *name);
Daniel Veillard652327a2003-09-29 18:02:38 +0000905XMLPUBFUN xmlChar * XMLCALL
906 xmlGetProp (xmlNodePtr node,
907 const xmlChar *name);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000908XMLPUBFUN xmlAttrPtr XMLCALL
909 xmlHasProp (xmlNodePtr node,
Owen Taylor3473f882001-02-23 17:55:21 +0000910 const xmlChar *name);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000911XMLPUBFUN xmlAttrPtr XMLCALL
912 xmlHasNsProp (xmlNodePtr node,
Daniel Veillarde95e2392001-06-06 10:46:28 +0000913 const xmlChar *name,
Daniel Veillardca2366a2001-06-11 12:09:01 +0000914 const xmlChar *nameSpace);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000915XMLPUBFUN xmlChar * XMLCALL
916 xmlGetNsProp (xmlNodePtr node,
Owen Taylor3473f882001-02-23 17:55:21 +0000917 const xmlChar *name,
918 const xmlChar *nameSpace);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000919XMLPUBFUN xmlNodePtr XMLCALL
920 xmlStringGetNodeList (xmlDocPtr doc,
Owen Taylor3473f882001-02-23 17:55:21 +0000921 const xmlChar *value);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000922XMLPUBFUN xmlNodePtr XMLCALL
923 xmlStringLenGetNodeList (xmlDocPtr doc,
Owen Taylor3473f882001-02-23 17:55:21 +0000924 const xmlChar *value,
925 int len);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000926XMLPUBFUN xmlChar * XMLCALL
927 xmlNodeListGetString (xmlDocPtr doc,
Owen Taylor3473f882001-02-23 17:55:21 +0000928 xmlNodePtr list,
929 int inLine);
Daniel Veillard652327a2003-09-29 18:02:38 +0000930#ifdef LIBXML_TREE_ENABLED
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000931XMLPUBFUN xmlChar * XMLCALL
932 xmlNodeListGetRawString (xmlDocPtr doc,
Owen Taylor3473f882001-02-23 17:55:21 +0000933 xmlNodePtr list,
934 int inLine);
Daniel Veillard652327a2003-09-29 18:02:38 +0000935#endif /* LIBXML_TREE_ENABLED */
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000936XMLPUBFUN void XMLCALL
937 xmlNodeSetContent (xmlNodePtr cur,
Owen Taylor3473f882001-02-23 17:55:21 +0000938 const xmlChar *content);
Daniel Veillard652327a2003-09-29 18:02:38 +0000939#ifdef LIBXML_TREE_ENABLED
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000940XMLPUBFUN void XMLCALL
941 xmlNodeSetContentLen (xmlNodePtr cur,
Owen Taylor3473f882001-02-23 17:55:21 +0000942 const xmlChar *content,
943 int len);
Daniel Veillard652327a2003-09-29 18:02:38 +0000944#endif /* LIBXML_TREE_ENABLED */
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000945XMLPUBFUN void XMLCALL
946 xmlNodeAddContent (xmlNodePtr cur,
Owen Taylor3473f882001-02-23 17:55:21 +0000947 const xmlChar *content);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000948XMLPUBFUN void XMLCALL
949 xmlNodeAddContentLen (xmlNodePtr cur,
Owen Taylor3473f882001-02-23 17:55:21 +0000950 const xmlChar *content,
951 int len);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000952XMLPUBFUN xmlChar * XMLCALL
953 xmlNodeGetContent (xmlNodePtr cur);
Daniel Veillard78697292003-10-19 20:44:43 +0000954XMLPUBFUN int XMLCALL
955 xmlNodeBufGetContent (xmlBufferPtr buffer,
956 xmlNodePtr cur);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000957XMLPUBFUN xmlChar * XMLCALL
958 xmlNodeGetLang (xmlNodePtr cur);
Daniel Veillard652327a2003-09-29 18:02:38 +0000959XMLPUBFUN int XMLCALL
960 xmlNodeGetSpacePreserve (xmlNodePtr cur);
961#ifdef LIBXML_TREE_ENABLED
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000962XMLPUBFUN void XMLCALL
963 xmlNodeSetLang (xmlNodePtr cur,
Owen Taylor3473f882001-02-23 17:55:21 +0000964 const xmlChar *lang);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000965XMLPUBFUN void XMLCALL
966 xmlNodeSetSpacePreserve (xmlNodePtr cur,
Daniel Veillardd1640922001-12-17 15:30:10 +0000967 int val);
Daniel Veillard652327a2003-09-29 18:02:38 +0000968#endif /* LIBXML_TREE_ENABLED */
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000969XMLPUBFUN xmlChar * XMLCALL
970 xmlNodeGetBase (xmlDocPtr doc,
Owen Taylor3473f882001-02-23 17:55:21 +0000971 xmlNodePtr cur);
William M. Brack21e4ef22005-01-02 09:53:13 +0000972#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000973XMLPUBFUN void XMLCALL
974 xmlNodeSetBase (xmlNodePtr cur,
Daniel Veillardf85ce8e2003-09-22 10:24:45 +0000975 const xmlChar *uri);
William M. Brack21e4ef22005-01-02 09:53:13 +0000976#endif
Owen Taylor3473f882001-02-23 17:55:21 +0000977
978/*
979 * Removing content.
980 */
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000981XMLPUBFUN int XMLCALL
982 xmlRemoveProp (xmlAttrPtr cur);
William M. Brack21e4ef22005-01-02 09:53:13 +0000983#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000984XMLPUBFUN int XMLCALL
985 xmlUnsetNsProp (xmlNodePtr node,
Daniel Veillard9403a042001-05-28 11:00:53 +0000986 xmlNsPtr ns,
987 const xmlChar *name);
William M. Brack21e4ef22005-01-02 09:53:13 +0000988XMLPUBFUN int XMLCALL
989 xmlUnsetProp (xmlNodePtr node,
990 const xmlChar *name);
991#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
Owen Taylor3473f882001-02-23 17:55:21 +0000992
993/*
Daniel Veillard61f26172002-03-12 18:46:39 +0000994 * Internal, don't use.
Owen Taylor3473f882001-02-23 17:55:21 +0000995 */
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000996XMLPUBFUN void XMLCALL
997 xmlBufferWriteCHAR (xmlBufferPtr buf,
Owen Taylor3473f882001-02-23 17:55:21 +0000998 const xmlChar *string);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +0000999XMLPUBFUN void XMLCALL
1000 xmlBufferWriteChar (xmlBufferPtr buf,
Owen Taylor3473f882001-02-23 17:55:21 +00001001 const char *string);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +00001002XMLPUBFUN void XMLCALL
1003 xmlBufferWriteQuotedString(xmlBufferPtr buf,
Owen Taylor3473f882001-02-23 17:55:21 +00001004 const xmlChar *string);
1005
William M. Brack21e4ef22005-01-02 09:53:13 +00001006#ifdef LIBXML_OUTPUT_ENABLED
William M. Bracka9c612c2004-02-01 10:04:05 +00001007XMLPUBFUN void xmlAttrSerializeTxtContent(xmlBufferPtr buf,
1008 xmlDocPtr doc,
1009 xmlAttrPtr attr,
1010 const xmlChar *string);
William M. Brack21e4ef22005-01-02 09:53:13 +00001011#endif /* LIBXML_OUTPUT_ENABLED */
William M. Bracka9c612c2004-02-01 10:04:05 +00001012
William M. Brack21e4ef22005-01-02 09:53:13 +00001013#ifdef LIBXML_TREE_ENABLED
Owen Taylor3473f882001-02-23 17:55:21 +00001014/*
Daniel Veillard61f26172002-03-12 18:46:39 +00001015 * Namespace handling.
Owen Taylor3473f882001-02-23 17:55:21 +00001016 */
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +00001017XMLPUBFUN int XMLCALL
1018 xmlReconciliateNs (xmlDocPtr doc,
Owen Taylor3473f882001-02-23 17:55:21 +00001019 xmlNodePtr tree);
William M. Brack21e4ef22005-01-02 09:53:13 +00001020#endif
Owen Taylor3473f882001-02-23 17:55:21 +00001021
Daniel Veillarda9cce9c2003-09-29 13:20:24 +00001022#ifdef LIBXML_OUTPUT_ENABLED
Owen Taylor3473f882001-02-23 17:55:21 +00001023/*
Daniel Veillard61f26172002-03-12 18:46:39 +00001024 * Saving.
Owen Taylor3473f882001-02-23 17:55:21 +00001025 */
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +00001026XMLPUBFUN void XMLCALL
1027 xmlDocDumpFormatMemory (xmlDocPtr cur,
Daniel Veillard963d2ae2002-01-20 22:08:18 +00001028 xmlChar **mem,
Owen Taylor3473f882001-02-23 17:55:21 +00001029 int *size,
1030 int format);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +00001031XMLPUBFUN void XMLCALL
1032 xmlDocDumpMemory (xmlDocPtr cur,
Daniel Veillard963d2ae2002-01-20 22:08:18 +00001033 xmlChar **mem,
Owen Taylor3473f882001-02-23 17:55:21 +00001034 int *size);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +00001035XMLPUBFUN void XMLCALL
1036 xmlDocDumpMemoryEnc (xmlDocPtr out_doc,
Owen Taylor3473f882001-02-23 17:55:21 +00001037 xmlChar **doc_txt_ptr,
1038 int * doc_txt_len,
1039 const char *txt_encoding);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +00001040XMLPUBFUN void XMLCALL
1041 xmlDocDumpFormatMemoryEnc(xmlDocPtr out_doc,
Owen Taylor3473f882001-02-23 17:55:21 +00001042 xmlChar **doc_txt_ptr,
1043 int * doc_txt_len,
1044 const char *txt_encoding,
1045 int format);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +00001046XMLPUBFUN int XMLCALL
1047 xmlDocFormatDump (FILE *f,
Daniel Veillard9e412302002-06-10 15:59:44 +00001048 xmlDocPtr cur,
1049 int format);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +00001050XMLPUBFUN int XMLCALL
1051 xmlDocDump (FILE *f,
Owen Taylor3473f882001-02-23 17:55:21 +00001052 xmlDocPtr cur);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +00001053XMLPUBFUN void XMLCALL
1054 xmlElemDump (FILE *f,
Owen Taylor3473f882001-02-23 17:55:21 +00001055 xmlDocPtr doc,
1056 xmlNodePtr cur);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +00001057XMLPUBFUN int XMLCALL
1058 xmlSaveFile (const char *filename,
Owen Taylor3473f882001-02-23 17:55:21 +00001059 xmlDocPtr cur);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +00001060XMLPUBFUN int XMLCALL
1061 xmlSaveFormatFile (const char *filename,
Daniel Veillard67fee942001-04-26 18:59:03 +00001062 xmlDocPtr cur,
1063 int format);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +00001064XMLPUBFUN int XMLCALL
1065 xmlNodeDump (xmlBufferPtr buf,
Owen Taylor3473f882001-02-23 17:55:21 +00001066 xmlDocPtr doc,
1067 xmlNodePtr cur,
1068 int level,
1069 int format);
1070
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +00001071XMLPUBFUN int XMLCALL
1072 xmlSaveFileTo (xmlOutputBufferPtr buf,
Owen Taylor3473f882001-02-23 17:55:21 +00001073 xmlDocPtr cur,
1074 const char *encoding);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +00001075XMLPUBFUN int XMLCALL
1076 xmlSaveFormatFileTo (xmlOutputBufferPtr buf,
CET 2001 Daniel Veillard5a37bde2001-11-01 14:31:22 +00001077 xmlDocPtr cur,
1078 const char *encoding,
1079 int format);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +00001080XMLPUBFUN void XMLCALL
1081 xmlNodeDumpOutput (xmlOutputBufferPtr buf,
CET 2001 Daniel Veillard5a37bde2001-11-01 14:31:22 +00001082 xmlDocPtr doc,
1083 xmlNodePtr cur,
1084 int level,
1085 int format,
1086 const char *encoding);
Owen Taylor3473f882001-02-23 17:55:21 +00001087
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +00001088XMLPUBFUN int XMLCALL
1089 xmlSaveFormatFileEnc (const char *filename,
Daniel Veillardd1640922001-12-17 15:30:10 +00001090 xmlDocPtr cur,
1091 const char *encoding,
1092 int format);
Daniel Veillardf012a642001-07-23 19:10:52 +00001093
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +00001094XMLPUBFUN int XMLCALL
1095 xmlSaveFileEnc (const char *filename,
Owen Taylor3473f882001-02-23 17:55:21 +00001096 xmlDocPtr cur,
1097 const char *encoding);
1098
Daniel Veillarda9cce9c2003-09-29 13:20:24 +00001099#endif /* LIBXML_OUTPUT_ENABLED */
Owen Taylor3473f882001-02-23 17:55:21 +00001100/*
Daniel Veillardd5c2f922002-11-21 14:10:52 +00001101 * XHTML
1102 */
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +00001103XMLPUBFUN int XMLCALL
1104 xmlIsXHTML (const xmlChar *systemID,
Daniel Veillardd5c2f922002-11-21 14:10:52 +00001105 const xmlChar *publicID);
1106
1107/*
Daniel Veillard61f26172002-03-12 18:46:39 +00001108 * Compression.
Owen Taylor3473f882001-02-23 17:55:21 +00001109 */
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +00001110XMLPUBFUN int XMLCALL
1111 xmlGetDocCompressMode (xmlDocPtr doc);
1112XMLPUBFUN void XMLCALL
1113 xmlSetDocCompressMode (xmlDocPtr doc,
Owen Taylor3473f882001-02-23 17:55:21 +00001114 int mode);
Igor Zlatkovicaa3cfbd2003-08-27 08:59:58 +00001115XMLPUBFUN int XMLCALL
1116 xmlGetCompressMode (void);
1117XMLPUBFUN void XMLCALL
1118 xmlSetCompressMode (int mode);
Owen Taylor3473f882001-02-23 17:55:21 +00001119
Kasimier T. Buchcikbc0e3c62005-06-27 10:28:23 +00001120/*
1121* DOM-wrapper helper functions.
1122*/
Kasimier T. Buchcik4d9c9482005-06-27 15:04:46 +00001123XMLPUBFUN xmlDOMWrapCtxtPtr XMLCALL
1124 xmlDOMWrapNewCtxt (void);
1125XMLPUBFUN void XMLCALL
1126 xmlDOMWrapFreeCtxt (xmlDOMWrapCtxtPtr ctxt);
Kasimier T. Buchcikbc0e3c62005-06-27 10:28:23 +00001127XMLPUBFUN int XMLCALL
1128 xmlDOMWrapReconcileNamespaces(xmlDOMWrapCtxtPtr ctxt,
1129 xmlNodePtr elem,
1130 int options);
1131XMLPUBFUN int XMLCALL
1132 xmlDOMWrapAdoptNode (xmlDOMWrapCtxtPtr ctxt,
1133 xmlDocPtr sourceDoc,
1134 xmlNodePtr node,
1135 xmlDocPtr destDoc,
1136 xmlNodePtr destParent,
1137 int options);
1138XMLPUBFUN int XMLCALL
1139 xmlDOMWrapRemoveNode (xmlDOMWrapCtxtPtr ctxt,
1140 xmlDocPtr doc,
1141 xmlNodePtr node,
1142 int options);
Kasimier T. Buchcika81d9192006-02-03 16:37:44 +00001143XMLPUBFUN 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. Buchcikbc0e3c62005-06-27 10:28:23 +00001152
Owen Taylor3473f882001-02-23 17:55:21 +00001153#ifdef __cplusplus
1154}
1155#endif
Daniel Veillard6c4ffaf2002-02-11 08:54:05 +00001156#ifndef __XML_PARSER_H__
1157#include <libxml/xmlmemory.h>
1158#endif
Owen Taylor3473f882001-02-23 17:55:21 +00001159
1160#endif /* __XML_TREE_H__ */
1161