VirtualBox

source: vbox/trunk/src/libs/libxml2-2.13.2/include/libxml/tree.h@ 107935

Last change on this file since 107935 was 105420, checked in by vboxsync, 7 months ago

libxml2-2.12.6: Applied and adjusted our libxml2 changes to 2.12.6. bugref:10730

  • Property svn:eol-style set to native
File size: 38.0 KB
Line 
1/*
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
6 *
7 * Copy: See Copyright for the status of this software.
8 *
9 * Author: Daniel Veillard
10 */
11
12#ifndef XML_TREE_INTERNALS
13
14/*
15 * Emulate circular dependency for backward compatibility
16 */
17#include <libxml/parser.h>
18
19#else /* XML_TREE_INTERNALS */
20
21#ifndef __XML_TREE_H__
22#define __XML_TREE_H__
23
24#include <stdio.h>
25#include <limits.h>
26#include <libxml/xmlversion.h>
27#include <libxml/xmlstring.h>
28#include <libxml/xmlmemory.h>
29#include <libxml/xmlregexp.h>
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35/*
36 * Some of the basic types pointer to structures:
37 */
38/* xmlIO.h */
39typedef struct _xmlParserInputBuffer xmlParserInputBuffer;
40typedef xmlParserInputBuffer *xmlParserInputBufferPtr;
41
42typedef struct _xmlOutputBuffer xmlOutputBuffer;
43typedef xmlOutputBuffer *xmlOutputBufferPtr;
44
45/* parser.h */
46typedef struct _xmlParserInput xmlParserInput;
47typedef xmlParserInput *xmlParserInputPtr;
48
49typedef struct _xmlParserCtxt xmlParserCtxt;
50typedef xmlParserCtxt *xmlParserCtxtPtr;
51
52typedef struct _xmlSAXLocator xmlSAXLocator;
53typedef xmlSAXLocator *xmlSAXLocatorPtr;
54
55typedef struct _xmlSAXHandler xmlSAXHandler;
56typedef xmlSAXHandler *xmlSAXHandlerPtr;
57
58/* entities.h */
59typedef struct _xmlEntity xmlEntity;
60typedef xmlEntity *xmlEntityPtr;
61
62/**
63 * BASE_BUFFER_SIZE:
64 *
65 * default buffer size 4000.
66 */
67#define BASE_BUFFER_SIZE 4096
68
69/**
70 * LIBXML_NAMESPACE_DICT:
71 *
72 * Defines experimental behaviour:
73 * 1) xmlNs gets an additional field @context (a xmlDoc)
74 * 2) when creating a tree, xmlNs->href is stored in the dict of xmlDoc.
75 */
76/* #define LIBXML_NAMESPACE_DICT */
77
78/**
79 * xmlBufferAllocationScheme:
80 *
81 * A buffer allocation scheme can be defined to either match exactly the
82 * need or double it's allocated size each time it is found too small.
83 */
84
85typedef enum {
86 XML_BUFFER_ALLOC_DOUBLEIT, /* double each time one need to grow */
87 XML_BUFFER_ALLOC_EXACT, /* grow only to the minimal size */
88 XML_BUFFER_ALLOC_IMMUTABLE, /* immutable buffer, deprecated */
89 XML_BUFFER_ALLOC_IO, /* special allocation scheme used for I/O */
90 XML_BUFFER_ALLOC_HYBRID, /* exact up to a threshold, and doubleit thereafter */
91 XML_BUFFER_ALLOC_BOUNDED /* limit the upper size of the buffer */
92} xmlBufferAllocationScheme;
93
94/**
95 * xmlBuffer:
96 *
97 * A buffer structure, this old construct is limited to 2GB and
98 * is being deprecated, use API with xmlBuf instead
99 */
100typedef struct _xmlBuffer xmlBuffer;
101typedef xmlBuffer *xmlBufferPtr;
102struct _xmlBuffer {
103 xmlChar *content; /* The buffer content UTF8 */
104 unsigned int use; /* The buffer size used */
105 unsigned int size; /* The buffer size */
106 xmlBufferAllocationScheme alloc; /* The realloc method */
107 xmlChar *contentIO; /* in IO mode we may have a different base */
108};
109
110/**
111 * xmlBuf:
112 *
113 * A buffer structure, new one, the actual structure internals are not public
114 */
115
116typedef struct _xmlBuf xmlBuf;
117
118/**
119 * xmlBufPtr:
120 *
121 * A pointer to a buffer structure, the actual structure internals are not
122 * public
123 */
124
125typedef xmlBuf *xmlBufPtr;
126
127/*
128 * A few public routines for xmlBuf. As those are expected to be used
129 * mostly internally the bulk of the routines are internal in buf.h
130 */
131XMLPUBFUN xmlChar* xmlBufContent (const xmlBuf* buf);
132XMLPUBFUN xmlChar* xmlBufEnd (xmlBufPtr buf);
133XMLPUBFUN size_t xmlBufUse (const xmlBufPtr buf);
134XMLPUBFUN size_t xmlBufShrink (xmlBufPtr buf, size_t len);
135
136/*
137 * LIBXML2_NEW_BUFFER:
138 *
139 * Macro used to express that the API use the new buffers for
140 * xmlParserInputBuffer and xmlOutputBuffer. The change was
141 * introduced in 2.9.0.
142 */
143#define LIBXML2_NEW_BUFFER
144
145/**
146 * XML_XML_NAMESPACE:
147 *
148 * This is the namespace for the special xml: prefix predefined in the
149 * XML Namespace specification.
150 */
151#define XML_XML_NAMESPACE \
152 (const xmlChar *) "http://www.w3.org/XML/1998/namespace"
153
154/**
155 * XML_XML_ID:
156 *
157 * This is the name for the special xml:id attribute
158 */
159#define XML_XML_ID (const xmlChar *) "xml:id"
160
161/*
162 * The different element types carried by an XML tree.
163 *
164 * NOTE: This is synchronized with DOM Level1 values
165 * See http://www.w3.org/TR/REC-DOM-Level-1/
166 *
167 * Actually this had diverged a bit, and now XML_DOCUMENT_TYPE_NODE should
168 * be deprecated to use an XML_DTD_NODE.
169 */
170typedef enum {
171 XML_ELEMENT_NODE= 1,
172 XML_ATTRIBUTE_NODE= 2,
173 XML_TEXT_NODE= 3,
174 XML_CDATA_SECTION_NODE= 4,
175 XML_ENTITY_REF_NODE= 5,
176 XML_ENTITY_NODE= 6, /* unused */
177 XML_PI_NODE= 7,
178 XML_COMMENT_NODE= 8,
179 XML_DOCUMENT_NODE= 9,
180 XML_DOCUMENT_TYPE_NODE= 10, /* unused */
181 XML_DOCUMENT_FRAG_NODE= 11,
182 XML_NOTATION_NODE= 12, /* unused */
183 XML_HTML_DOCUMENT_NODE= 13,
184 XML_DTD_NODE= 14,
185 XML_ELEMENT_DECL= 15,
186 XML_ATTRIBUTE_DECL= 16,
187 XML_ENTITY_DECL= 17,
188 XML_NAMESPACE_DECL= 18,
189 XML_XINCLUDE_START= 19,
190 XML_XINCLUDE_END= 20
191 /* XML_DOCB_DOCUMENT_NODE= 21 */ /* removed */
192} xmlElementType;
193
194/** DOC_DISABLE */
195/* For backward compatibility */
196#define XML_DOCB_DOCUMENT_NODE 21
197/** DOC_ENABLE */
198
199/**
200 * xmlNotation:
201 *
202 * A DTD Notation definition.
203 */
204
205typedef struct _xmlNotation xmlNotation;
206typedef xmlNotation *xmlNotationPtr;
207struct _xmlNotation {
208 const xmlChar *name; /* Notation name */
209 const xmlChar *PublicID; /* Public identifier, if any */
210 const xmlChar *SystemID; /* System identifier, if any */
211};
212
213/**
214 * xmlAttributeType:
215 *
216 * A DTD Attribute type definition.
217 */
218
219typedef enum {
220 XML_ATTRIBUTE_CDATA = 1,
221 XML_ATTRIBUTE_ID,
222 XML_ATTRIBUTE_IDREF ,
223 XML_ATTRIBUTE_IDREFS,
224 XML_ATTRIBUTE_ENTITY,
225 XML_ATTRIBUTE_ENTITIES,
226 XML_ATTRIBUTE_NMTOKEN,
227 XML_ATTRIBUTE_NMTOKENS,
228 XML_ATTRIBUTE_ENUMERATION,
229 XML_ATTRIBUTE_NOTATION
230} xmlAttributeType;
231
232/**
233 * xmlAttributeDefault:
234 *
235 * A DTD Attribute default definition.
236 */
237
238typedef enum {
239 XML_ATTRIBUTE_NONE = 1,
240 XML_ATTRIBUTE_REQUIRED,
241 XML_ATTRIBUTE_IMPLIED,
242 XML_ATTRIBUTE_FIXED
243} xmlAttributeDefault;
244
245/**
246 * xmlEnumeration:
247 *
248 * List structure used when there is an enumeration in DTDs.
249 */
250
251typedef struct _xmlEnumeration xmlEnumeration;
252typedef xmlEnumeration *xmlEnumerationPtr;
253struct _xmlEnumeration {
254 struct _xmlEnumeration *next; /* next one */
255 const xmlChar *name; /* Enumeration name */
256};
257
258/**
259 * xmlAttribute:
260 *
261 * An Attribute declaration in a DTD.
262 */
263
264typedef struct _xmlAttribute xmlAttribute;
265typedef xmlAttribute *xmlAttributePtr;
266struct _xmlAttribute {
267 void *_private; /* application data */
268 xmlElementType type; /* XML_ATTRIBUTE_DECL, must be second ! */
269 const xmlChar *name; /* Attribute name */
270 struct _xmlNode *children; /* NULL */
271 struct _xmlNode *last; /* NULL */
272 struct _xmlDtd *parent; /* -> DTD */
273 struct _xmlNode *next; /* next sibling link */
274 struct _xmlNode *prev; /* previous sibling link */
275 struct _xmlDoc *doc; /* the containing document */
276
277 struct _xmlAttribute *nexth; /* next in hash table */
278 xmlAttributeType atype; /* The attribute type */
279 xmlAttributeDefault def; /* the default */
280 const xmlChar *defaultValue; /* or the default value */
281 xmlEnumerationPtr tree; /* or the enumeration tree if any */
282 const xmlChar *prefix; /* the namespace prefix if any */
283 const xmlChar *elem; /* Element holding the attribute */
284};
285
286/**
287 * xmlElementContentType:
288 *
289 * Possible definitions of element content types.
290 */
291typedef enum {
292 XML_ELEMENT_CONTENT_PCDATA = 1,
293 XML_ELEMENT_CONTENT_ELEMENT,
294 XML_ELEMENT_CONTENT_SEQ,
295 XML_ELEMENT_CONTENT_OR
296} xmlElementContentType;
297
298/**
299 * xmlElementContentOccur:
300 *
301 * Possible definitions of element content occurrences.
302 */
303typedef enum {
304 XML_ELEMENT_CONTENT_ONCE = 1,
305 XML_ELEMENT_CONTENT_OPT,
306 XML_ELEMENT_CONTENT_MULT,
307 XML_ELEMENT_CONTENT_PLUS
308} xmlElementContentOccur;
309
310/**
311 * xmlElementContent:
312 *
313 * An XML Element content as stored after parsing an element definition
314 * in a DTD.
315 */
316
317typedef struct _xmlElementContent xmlElementContent;
318typedef xmlElementContent *xmlElementContentPtr;
319struct _xmlElementContent {
320 xmlElementContentType type; /* PCDATA, ELEMENT, SEQ or OR */
321 xmlElementContentOccur ocur; /* ONCE, OPT, MULT or PLUS */
322 const xmlChar *name; /* Element name */
323 struct _xmlElementContent *c1; /* first child */
324 struct _xmlElementContent *c2; /* second child */
325 struct _xmlElementContent *parent; /* parent */
326 const xmlChar *prefix; /* Namespace prefix */
327};
328
329/**
330 * xmlElementTypeVal:
331 *
332 * The different possibilities for an element content type.
333 */
334
335typedef enum {
336 XML_ELEMENT_TYPE_UNDEFINED = 0,
337 XML_ELEMENT_TYPE_EMPTY = 1,
338 XML_ELEMENT_TYPE_ANY,
339 XML_ELEMENT_TYPE_MIXED,
340 XML_ELEMENT_TYPE_ELEMENT
341} xmlElementTypeVal;
342
343/**
344 * xmlElement:
345 *
346 * An XML Element declaration from a DTD.
347 */
348
349typedef struct _xmlElement xmlElement;
350typedef xmlElement *xmlElementPtr;
351struct _xmlElement {
352 void *_private; /* application data */
353 xmlElementType type; /* XML_ELEMENT_DECL, must be second ! */
354 const xmlChar *name; /* Element name */
355 struct _xmlNode *children; /* NULL */
356 struct _xmlNode *last; /* NULL */
357 struct _xmlDtd *parent; /* -> DTD */
358 struct _xmlNode *next; /* next sibling link */
359 struct _xmlNode *prev; /* previous sibling link */
360 struct _xmlDoc *doc; /* the containing document */
361
362 xmlElementTypeVal etype; /* The type */
363 xmlElementContentPtr content; /* the allowed element content */
364 xmlAttributePtr attributes; /* List of the declared attributes */
365 const xmlChar *prefix; /* the namespace prefix if any */
366#ifdef LIBXML_REGEXP_ENABLED
367 xmlRegexpPtr contModel; /* the validating regexp */
368#else
369 void *contModel;
370#endif
371};
372
373
374/**
375 * XML_LOCAL_NAMESPACE:
376 *
377 * A namespace declaration node.
378 */
379#define XML_LOCAL_NAMESPACE XML_NAMESPACE_DECL
380typedef xmlElementType xmlNsType;
381
382/**
383 * xmlNs:
384 *
385 * An XML namespace.
386 * Note that prefix == NULL is valid, it defines the default namespace
387 * within the subtree (until overridden).
388 *
389 * xmlNsType is unified with xmlElementType.
390 */
391
392typedef struct _xmlNs xmlNs;
393typedef xmlNs *xmlNsPtr;
394struct _xmlNs {
395 struct _xmlNs *next; /* next Ns link for this node */
396 xmlNsType type; /* global or local */
397 const xmlChar *href; /* URL for the namespace */
398 const xmlChar *prefix; /* prefix for the namespace */
399 void *_private; /* application data */
400 struct _xmlDoc *context; /* normally an xmlDoc */
401};
402
403/**
404 * xmlDtd:
405 *
406 * An XML DTD, as defined by <!DOCTYPE ... There is actually one for
407 * the internal subset and for the external subset.
408 */
409typedef struct _xmlDtd xmlDtd;
410typedef xmlDtd *xmlDtdPtr;
411struct _xmlDtd {
412 void *_private; /* application data */
413 xmlElementType type; /* XML_DTD_NODE, must be second ! */
414 const xmlChar *name; /* Name of the DTD */
415 struct _xmlNode *children; /* the value of the property link */
416 struct _xmlNode *last; /* last child link */
417 struct _xmlDoc *parent; /* child->parent link */
418 struct _xmlNode *next; /* next sibling link */
419 struct _xmlNode *prev; /* previous sibling link */
420 struct _xmlDoc *doc; /* the containing document */
421
422 /* End of common part */
423 void *notations; /* Hash table for notations if any */
424 void *elements; /* Hash table for elements if any */
425 void *attributes; /* Hash table for attributes if any */
426 void *entities; /* Hash table for entities if any */
427 const xmlChar *ExternalID; /* External identifier for PUBLIC DTD */
428 const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC DTD */
429 void *pentities; /* Hash table for param entities if any */
430};
431
432/**
433 * xmlAttr:
434 *
435 * An attribute on an XML node.
436 */
437typedef struct _xmlAttr xmlAttr;
438typedef xmlAttr *xmlAttrPtr;
439struct _xmlAttr {
440 void *_private; /* application data */
441 xmlElementType type; /* XML_ATTRIBUTE_NODE, must be second ! */
442 const xmlChar *name; /* the name of the property */
443 struct _xmlNode *children; /* the value of the property */
444 struct _xmlNode *last; /* NULL */
445 struct _xmlNode *parent; /* child->parent link */
446 struct _xmlAttr *next; /* next sibling link */
447 struct _xmlAttr *prev; /* previous sibling link */
448 struct _xmlDoc *doc; /* the containing document */
449 xmlNs *ns; /* pointer to the associated namespace */
450 xmlAttributeType atype; /* the attribute type if validating */
451 void *psvi; /* for type/PSVI information */
452 struct _xmlID *id; /* the ID struct */
453};
454
455/**
456 * xmlID:
457 *
458 * An XML ID instance.
459 */
460
461typedef struct _xmlID xmlID;
462typedef xmlID *xmlIDPtr;
463struct _xmlID {
464 struct _xmlID *next; /* next ID */
465 const xmlChar *value; /* The ID name */
466 xmlAttrPtr attr; /* The attribute holding it */
467 const xmlChar *name; /* The attribute if attr is not available */
468 int lineno; /* The line number if attr is not available */
469 struct _xmlDoc *doc; /* The document holding the ID */
470};
471
472/**
473 * xmlRef:
474 *
475 * An XML IDREF instance.
476 */
477
478typedef struct _xmlRef xmlRef;
479typedef xmlRef *xmlRefPtr;
480struct _xmlRef {
481 struct _xmlRef *next; /* next Ref */
482 const xmlChar *value; /* The Ref name */
483 xmlAttrPtr attr; /* The attribute holding it */
484 const xmlChar *name; /* The attribute if attr is not available */
485 int lineno; /* The line number if attr is not available */
486};
487
488/**
489 * xmlNode:
490 *
491 * A node in an XML tree.
492 */
493typedef struct _xmlNode xmlNode;
494typedef xmlNode *xmlNodePtr;
495struct _xmlNode {
496 void *_private; /* application data */
497 xmlElementType type; /* type number, must be second ! */
498 const xmlChar *name; /* the name of the node, or the entity */
499 struct _xmlNode *children; /* parent->childs link */
500 struct _xmlNode *last; /* last child link */
501 struct _xmlNode *parent; /* child->parent link */
502 struct _xmlNode *next; /* next sibling link */
503 struct _xmlNode *prev; /* previous sibling link */
504 struct _xmlDoc *doc; /* the containing document */
505
506 /* End of common part */
507 xmlNs *ns; /* pointer to the associated namespace */
508 xmlChar *content; /* the content */
509 struct _xmlAttr *properties;/* properties list */
510 xmlNs *nsDef; /* namespace definitions on this node */
511 void *psvi; /* for type/PSVI information */
512 unsigned short line; /* line number */
513 unsigned short extra; /* extra data for XPath/XSLT */
514};
515
516/**
517 * XML_GET_CONTENT:
518 *
519 * Macro to extract the content pointer of a node.
520 */
521#define XML_GET_CONTENT(n) \
522 ((n)->type == XML_ELEMENT_NODE ? NULL : (n)->content)
523
524/**
525 * XML_GET_LINE:
526 *
527 * Macro to extract the line number of an element node.
528 */
529#define XML_GET_LINE(n) \
530 (xmlGetLineNo(n))
531
532/**
533 * xmlDocProperty
534 *
535 * Set of properties of the document as found by the parser
536 * Some of them are linked to similarly named xmlParserOption
537 */
538typedef enum {
539 XML_DOC_WELLFORMED = 1<<0, /* document is XML well formed */
540 XML_DOC_NSVALID = 1<<1, /* document is Namespace valid */
541 XML_DOC_OLD10 = 1<<2, /* parsed with old XML-1.0 parser */
542 XML_DOC_DTDVALID = 1<<3, /* DTD validation was successful */
543 XML_DOC_XINCLUDE = 1<<4, /* XInclude substitution was done */
544 XML_DOC_USERBUILT = 1<<5, /* Document was built using the API
545 and not by parsing an instance */
546 XML_DOC_INTERNAL = 1<<6, /* built for internal processing */
547 XML_DOC_HTML = 1<<7 /* parsed or built HTML document */
548} xmlDocProperties;
549
550/**
551 * xmlDoc:
552 *
553 * An XML document.
554 */
555typedef struct _xmlDoc xmlDoc;
556typedef xmlDoc *xmlDocPtr;
557struct _xmlDoc {
558 void *_private; /* application data */
559 xmlElementType type; /* XML_DOCUMENT_NODE, must be second ! */
560 char *name; /* name/filename/URI of the document */
561 struct _xmlNode *children; /* the document tree */
562 struct _xmlNode *last; /* last child link */
563 struct _xmlNode *parent; /* child->parent link */
564 struct _xmlNode *next; /* next sibling link */
565 struct _xmlNode *prev; /* previous sibling link */
566 struct _xmlDoc *doc; /* autoreference to itself */
567
568 /* End of common part */
569 int compression;/* level of zlib compression */
570 int standalone; /* standalone document (no external refs)
571 1 if standalone="yes"
572 0 if standalone="no"
573 -1 if there is no XML declaration
574 -2 if there is an XML declaration, but no
575 standalone attribute was specified */
576 struct _xmlDtd *intSubset; /* the document internal subset */
577 struct _xmlDtd *extSubset; /* the document external subset */
578 struct _xmlNs *oldNs; /* Global namespace, the old way */
579 const xmlChar *version; /* the XML version string */
580 const xmlChar *encoding; /* actual encoding, if any */
581 void *ids; /* Hash table for ID attributes if any */
582 void *refs; /* Hash table for IDREFs attributes if any */
583 const xmlChar *URL; /* The URI for that document */
584 int charset; /* unused */
585 struct _xmlDict *dict; /* dict used to allocate names or NULL */
586 void *psvi; /* for type/PSVI information */
587 int parseFlags; /* set of xmlParserOption used to parse the
588 document */
589 int properties; /* set of xmlDocProperties for this document
590 set at the end of parsing */
591};
592
593
594typedef struct _xmlDOMWrapCtxt xmlDOMWrapCtxt;
595typedef xmlDOMWrapCtxt *xmlDOMWrapCtxtPtr;
596
597/**
598 * xmlDOMWrapAcquireNsFunction:
599 * @ctxt: a DOM wrapper context
600 * @node: the context node (element or attribute)
601 * @nsName: the requested namespace name
602 * @nsPrefix: the requested namespace prefix
603 *
604 * A function called to acquire namespaces (xmlNs) from the wrapper.
605 *
606 * Returns an xmlNsPtr or NULL in case of an error.
607 */
608typedef xmlNsPtr (*xmlDOMWrapAcquireNsFunction) (xmlDOMWrapCtxtPtr ctxt,
609 xmlNodePtr node,
610 const xmlChar *nsName,
611 const xmlChar *nsPrefix);
612
613/**
614 * xmlDOMWrapCtxt:
615 *
616 * Context for DOM wrapper-operations.
617 */
618struct _xmlDOMWrapCtxt {
619 void * _private;
620 /*
621 * The type of this context, just in case we need specialized
622 * contexts in the future.
623 */
624 int type;
625 /*
626 * Internal namespace map used for various operations.
627 */
628 void * namespaceMap;
629 /*
630 * Use this one to acquire an xmlNsPtr intended for node->ns.
631 * (Note that this is not intended for elem->nsDef).
632 */
633 xmlDOMWrapAcquireNsFunction getNsForNodeFunc;
634};
635
636/**
637 * xmlRegisterNodeFunc:
638 * @node: the current node
639 *
640 * Signature for the registration callback of a created node
641 */
642typedef void (*xmlRegisterNodeFunc) (xmlNodePtr node);
643
644/**
645 * xmlDeregisterNodeFunc:
646 * @node: the current node
647 *
648 * Signature for the deregistration callback of a discarded node
649 */
650typedef void (*xmlDeregisterNodeFunc) (xmlNodePtr node);
651
652/**
653 * xmlChildrenNode:
654 *
655 * Macro for compatibility naming layer with libxml1. Maps
656 * to "children."
657 */
658#ifndef xmlChildrenNode
659#define xmlChildrenNode children
660#endif
661
662/**
663 * xmlRootNode:
664 *
665 * Macro for compatibility naming layer with libxml1. Maps
666 * to "children".
667 */
668#ifndef xmlRootNode
669#define xmlRootNode children
670#endif
671
672/*
673 * Variables.
674 */
675
676/** DOC_DISABLE */
677#define XML_GLOBALS_TREE \
678 XML_OP(xmlBufferAllocScheme, xmlBufferAllocationScheme, XML_DEPRECATED) \
679 XML_OP(xmlDefaultBufferSize, int, XML_DEPRECATED) \
680 XML_OP(xmlRegisterNodeDefaultValue, xmlRegisterNodeFunc, XML_DEPRECATED) \
681 XML_OP(xmlDeregisterNodeDefaultValue, xmlDeregisterNodeFunc, \
682 XML_DEPRECATED)
683
684#define XML_OP XML_DECLARE_GLOBAL
685XML_GLOBALS_TREE
686#undef XML_OP
687
688#if defined(LIBXML_THREAD_ENABLED) && !defined(XML_GLOBALS_NO_REDEFINITION)
689 #define xmlBufferAllocScheme XML_GLOBAL_MACRO(xmlBufferAllocScheme)
690 #define xmlDefaultBufferSize XML_GLOBAL_MACRO(xmlDefaultBufferSize)
691 #define xmlRegisterNodeDefaultValue \
692 XML_GLOBAL_MACRO(xmlRegisterNodeDefaultValue)
693 #define xmlDeregisterNodeDefaultValue \
694 XML_GLOBAL_MACRO(xmlDeregisterNodeDefaultValue)
695#endif
696/** DOC_ENABLE */
697
698/*
699 * Some helper functions
700 */
701XMLPUBFUN int
702 xmlValidateNCName (const xmlChar *value,
703 int space);
704
705#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
706XMLPUBFUN int
707 xmlValidateQName (const xmlChar *value,
708 int space);
709XMLPUBFUN int
710 xmlValidateName (const xmlChar *value,
711 int space);
712XMLPUBFUN int
713 xmlValidateNMToken (const xmlChar *value,
714 int space);
715#endif
716
717XMLPUBFUN xmlChar *
718 xmlBuildQName (const xmlChar *ncname,
719 const xmlChar *prefix,
720 xmlChar *memory,
721 int len);
722XMLPUBFUN xmlChar *
723 xmlSplitQName2 (const xmlChar *name,
724 xmlChar **prefix);
725XMLPUBFUN const xmlChar *
726 xmlSplitQName3 (const xmlChar *name,
727 int *len);
728
729/*
730 * Handling Buffers, the old ones see @xmlBuf for the new ones.
731 */
732
733XMLPUBFUN void
734 xmlSetBufferAllocationScheme(xmlBufferAllocationScheme scheme);
735XMLPUBFUN xmlBufferAllocationScheme
736 xmlGetBufferAllocationScheme(void);
737
738XMLPUBFUN xmlBufferPtr
739 xmlBufferCreate (void);
740XMLPUBFUN xmlBufferPtr
741 xmlBufferCreateSize (size_t size);
742XMLPUBFUN xmlBufferPtr
743 xmlBufferCreateStatic (void *mem,
744 size_t size);
745XMLPUBFUN int
746 xmlBufferResize (xmlBufferPtr buf,
747 unsigned int size);
748XMLPUBFUN void
749 xmlBufferFree (xmlBufferPtr buf);
750XMLPUBFUN int
751 xmlBufferDump (FILE *file,
752 xmlBufferPtr buf);
753XMLPUBFUN int
754 xmlBufferAdd (xmlBufferPtr buf,
755 const xmlChar *str,
756 int len);
757XMLPUBFUN int
758 xmlBufferAddHead (xmlBufferPtr buf,
759 const xmlChar *str,
760 int len);
761XMLPUBFUN int
762 xmlBufferCat (xmlBufferPtr buf,
763 const xmlChar *str);
764XMLPUBFUN int
765 xmlBufferCCat (xmlBufferPtr buf,
766 const char *str);
767XMLPUBFUN int
768 xmlBufferShrink (xmlBufferPtr buf,
769 unsigned int len);
770XMLPUBFUN int
771 xmlBufferGrow (xmlBufferPtr buf,
772 unsigned int len);
773XMLPUBFUN void
774 xmlBufferEmpty (xmlBufferPtr buf);
775XMLPUBFUN const xmlChar*
776 xmlBufferContent (const xmlBuffer *buf);
777XMLPUBFUN xmlChar*
778 xmlBufferDetach (xmlBufferPtr buf);
779XMLPUBFUN void
780 xmlBufferSetAllocationScheme(xmlBufferPtr buf,
781 xmlBufferAllocationScheme scheme);
782XMLPUBFUN int
783 xmlBufferLength (const xmlBuffer *buf);
784
785/*
786 * Creating/freeing new structures.
787 */
788XMLPUBFUN xmlDtdPtr
789 xmlCreateIntSubset (xmlDocPtr doc,
790 const xmlChar *name,
791 const xmlChar *ExternalID,
792 const xmlChar *SystemID);
793XMLPUBFUN xmlDtdPtr
794 xmlNewDtd (xmlDocPtr doc,
795 const xmlChar *name,
796 const xmlChar *ExternalID,
797 const xmlChar *SystemID);
798XMLPUBFUN xmlDtdPtr
799 xmlGetIntSubset (const xmlDoc *doc);
800XMLPUBFUN void
801 xmlFreeDtd (xmlDtdPtr cur);
802#ifdef LIBXML_LEGACY_ENABLED
803XML_DEPRECATED
804XMLPUBFUN xmlNsPtr
805 xmlNewGlobalNs (xmlDocPtr doc,
806 const xmlChar *href,
807 const xmlChar *prefix);
808#endif /* LIBXML_LEGACY_ENABLED */
809XMLPUBFUN xmlNsPtr
810 xmlNewNs (xmlNodePtr node,
811 const xmlChar *href,
812 const xmlChar *prefix);
813XMLPUBFUN void
814 xmlFreeNs (xmlNsPtr cur);
815XMLPUBFUN void
816 xmlFreeNsList (xmlNsPtr cur);
817XMLPUBFUN xmlDocPtr
818 xmlNewDoc (const xmlChar *version);
819XMLPUBFUN void
820 xmlFreeDoc (xmlDocPtr cur);
821XMLPUBFUN xmlAttrPtr
822 xmlNewDocProp (xmlDocPtr doc,
823 const xmlChar *name,
824 const xmlChar *value);
825#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || \
826 defined(LIBXML_SCHEMAS_ENABLED)
827XMLPUBFUN xmlAttrPtr
828 xmlNewProp (xmlNodePtr node,
829 const xmlChar *name,
830 const xmlChar *value);
831#endif
832XMLPUBFUN xmlAttrPtr
833 xmlNewNsProp (xmlNodePtr node,
834 xmlNsPtr ns,
835 const xmlChar *name,
836 const xmlChar *value);
837XMLPUBFUN xmlAttrPtr
838 xmlNewNsPropEatName (xmlNodePtr node,
839 xmlNsPtr ns,
840 xmlChar *name,
841 const xmlChar *value);
842XMLPUBFUN void
843 xmlFreePropList (xmlAttrPtr cur);
844XMLPUBFUN void
845 xmlFreeProp (xmlAttrPtr cur);
846XMLPUBFUN xmlAttrPtr
847 xmlCopyProp (xmlNodePtr target,
848 xmlAttrPtr cur);
849XMLPUBFUN xmlAttrPtr
850 xmlCopyPropList (xmlNodePtr target,
851 xmlAttrPtr cur);
852#ifdef LIBXML_TREE_ENABLED
853XMLPUBFUN xmlDtdPtr
854 xmlCopyDtd (xmlDtdPtr dtd);
855#endif /* LIBXML_TREE_ENABLED */
856#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
857XMLPUBFUN xmlDocPtr
858 xmlCopyDoc (xmlDocPtr doc,
859 int recursive);
860#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
861/*
862 * Creating new nodes.
863 */
864XMLPUBFUN xmlNodePtr
865 xmlNewDocNode (xmlDocPtr doc,
866 xmlNsPtr ns,
867 const xmlChar *name,
868 const xmlChar *content);
869XMLPUBFUN xmlNodePtr
870 xmlNewDocNodeEatName (xmlDocPtr doc,
871 xmlNsPtr ns,
872 xmlChar *name,
873 const xmlChar *content);
874XMLPUBFUN xmlNodePtr
875 xmlNewNode (xmlNsPtr ns,
876 const xmlChar *name);
877XMLPUBFUN xmlNodePtr
878 xmlNewNodeEatName (xmlNsPtr ns,
879 xmlChar *name);
880#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
881XMLPUBFUN xmlNodePtr
882 xmlNewChild (xmlNodePtr parent,
883 xmlNsPtr ns,
884 const xmlChar *name,
885 const xmlChar *content);
886#endif
887XMLPUBFUN xmlNodePtr
888 xmlNewDocText (const xmlDoc *doc,
889 const xmlChar *content);
890XMLPUBFUN xmlNodePtr
891 xmlNewText (const xmlChar *content);
892XMLPUBFUN xmlNodePtr
893 xmlNewDocPI (xmlDocPtr doc,
894 const xmlChar *name,
895 const xmlChar *content);
896XMLPUBFUN xmlNodePtr
897 xmlNewPI (const xmlChar *name,
898 const xmlChar *content);
899XMLPUBFUN xmlNodePtr
900 xmlNewDocTextLen (xmlDocPtr doc,
901 const xmlChar *content,
902 int len);
903XMLPUBFUN xmlNodePtr
904 xmlNewTextLen (const xmlChar *content,
905 int len);
906XMLPUBFUN xmlNodePtr
907 xmlNewDocComment (xmlDocPtr doc,
908 const xmlChar *content);
909XMLPUBFUN xmlNodePtr
910 xmlNewComment (const xmlChar *content);
911XMLPUBFUN xmlNodePtr
912 xmlNewCDataBlock (xmlDocPtr doc,
913 const xmlChar *content,
914 int len);
915XMLPUBFUN xmlNodePtr
916 xmlNewCharRef (xmlDocPtr doc,
917 const xmlChar *name);
918XMLPUBFUN xmlNodePtr
919 xmlNewReference (const xmlDoc *doc,
920 const xmlChar *name);
921XMLPUBFUN xmlNodePtr
922 xmlCopyNode (xmlNodePtr node,
923 int recursive);
924XMLPUBFUN xmlNodePtr
925 xmlDocCopyNode (xmlNodePtr node,
926 xmlDocPtr doc,
927 int recursive);
928XMLPUBFUN xmlNodePtr
929 xmlDocCopyNodeList (xmlDocPtr doc,
930 xmlNodePtr node);
931XMLPUBFUN xmlNodePtr
932 xmlCopyNodeList (xmlNodePtr node);
933#ifdef LIBXML_TREE_ENABLED
934XMLPUBFUN xmlNodePtr
935 xmlNewTextChild (xmlNodePtr parent,
936 xmlNsPtr ns,
937 const xmlChar *name,
938 const xmlChar *content);
939XMLPUBFUN xmlNodePtr
940 xmlNewDocRawNode (xmlDocPtr doc,
941 xmlNsPtr ns,
942 const xmlChar *name,
943 const xmlChar *content);
944XMLPUBFUN xmlNodePtr
945 xmlNewDocFragment (xmlDocPtr doc);
946#endif /* LIBXML_TREE_ENABLED */
947
948/*
949 * Navigating.
950 */
951XMLPUBFUN long
952 xmlGetLineNo (const xmlNode *node);
953#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED)
954XMLPUBFUN xmlChar *
955 xmlGetNodePath (const xmlNode *node);
956#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED) */
957XMLPUBFUN xmlNodePtr
958 xmlDocGetRootElement (const xmlDoc *doc);
959XMLPUBFUN xmlNodePtr
960 xmlGetLastChild (const xmlNode *parent);
961XMLPUBFUN int
962 xmlNodeIsText (const xmlNode *node);
963XMLPUBFUN int
964 xmlIsBlankNode (const xmlNode *node);
965
966/*
967 * Changing the structure.
968 */
969#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
970XMLPUBFUN xmlNodePtr
971 xmlDocSetRootElement (xmlDocPtr doc,
972 xmlNodePtr root);
973#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) */
974#ifdef LIBXML_TREE_ENABLED
975XMLPUBFUN void
976 xmlNodeSetName (xmlNodePtr cur,
977 const xmlChar *name);
978#endif /* LIBXML_TREE_ENABLED */
979XMLPUBFUN xmlNodePtr
980 xmlAddChild (xmlNodePtr parent,
981 xmlNodePtr cur);
982XMLPUBFUN xmlNodePtr
983 xmlAddChildList (xmlNodePtr parent,
984 xmlNodePtr cur);
985#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
986XMLPUBFUN xmlNodePtr
987 xmlReplaceNode (xmlNodePtr old,
988 xmlNodePtr cur);
989#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) */
990#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || \
991 defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
992XMLPUBFUN xmlNodePtr
993 xmlAddPrevSibling (xmlNodePtr cur,
994 xmlNodePtr elem);
995#endif /* LIBXML_TREE_ENABLED || LIBXML_HTML_ENABLED || LIBXML_SCHEMAS_ENABLED */
996XMLPUBFUN xmlNodePtr
997 xmlAddSibling (xmlNodePtr cur,
998 xmlNodePtr elem);
999XMLPUBFUN xmlNodePtr
1000 xmlAddNextSibling (xmlNodePtr cur,
1001 xmlNodePtr elem);
1002XMLPUBFUN void
1003 xmlUnlinkNode (xmlNodePtr cur);
1004XMLPUBFUN xmlNodePtr
1005 xmlTextMerge (xmlNodePtr first,
1006 xmlNodePtr second);
1007XMLPUBFUN int
1008 xmlTextConcat (xmlNodePtr node,
1009 const xmlChar *content,
1010 int len);
1011XMLPUBFUN void
1012 xmlFreeNodeList (xmlNodePtr cur);
1013XMLPUBFUN void
1014 xmlFreeNode (xmlNodePtr cur);
1015XMLPUBFUN int
1016 xmlSetTreeDoc (xmlNodePtr tree,
1017 xmlDocPtr doc);
1018XMLPUBFUN int
1019 xmlSetListDoc (xmlNodePtr list,
1020 xmlDocPtr doc);
1021/*
1022 * Namespaces.
1023 */
1024XMLPUBFUN xmlNsPtr
1025 xmlSearchNs (xmlDocPtr doc,
1026 xmlNodePtr node,
1027 const xmlChar *nameSpace);
1028XMLPUBFUN xmlNsPtr
1029 xmlSearchNsByHref (xmlDocPtr doc,
1030 xmlNodePtr node,
1031 const xmlChar *href);
1032#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || \
1033 defined(LIBXML_SCHEMAS_ENABLED)
1034XMLPUBFUN int
1035 xmlGetNsListSafe (const xmlDoc *doc,
1036 const xmlNode *node,
1037 xmlNsPtr **out);
1038XMLPUBFUN xmlNsPtr *
1039 xmlGetNsList (const xmlDoc *doc,
1040 const xmlNode *node);
1041#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) */
1042
1043XMLPUBFUN void
1044 xmlSetNs (xmlNodePtr node,
1045 xmlNsPtr ns);
1046XMLPUBFUN xmlNsPtr
1047 xmlCopyNamespace (xmlNsPtr cur);
1048XMLPUBFUN xmlNsPtr
1049 xmlCopyNamespaceList (xmlNsPtr cur);
1050
1051/*
1052 * Changing the content.
1053 */
1054#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || \
1055 defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED)
1056XMLPUBFUN xmlAttrPtr
1057 xmlSetProp (xmlNodePtr node,
1058 const xmlChar *name,
1059 const xmlChar *value);
1060XMLPUBFUN xmlAttrPtr
1061 xmlSetNsProp (xmlNodePtr node,
1062 xmlNsPtr ns,
1063 const xmlChar *name,
1064 const xmlChar *value);
1065#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || \
1066 defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED) */
1067XMLPUBFUN int
1068 xmlNodeGetAttrValue (const xmlNode *node,
1069 const xmlChar *name,
1070 const xmlChar *nsUri,
1071 xmlChar **out);
1072XMLPUBFUN xmlChar *
1073 xmlGetNoNsProp (const xmlNode *node,
1074 const xmlChar *name);
1075XMLPUBFUN xmlChar *
1076 xmlGetProp (const xmlNode *node,
1077 const xmlChar *name);
1078XMLPUBFUN xmlAttrPtr
1079 xmlHasProp (const xmlNode *node,
1080 const xmlChar *name);
1081XMLPUBFUN xmlAttrPtr
1082 xmlHasNsProp (const xmlNode *node,
1083 const xmlChar *name,
1084 const xmlChar *nameSpace);
1085XMLPUBFUN xmlChar *
1086 xmlGetNsProp (const xmlNode *node,
1087 const xmlChar *name,
1088 const xmlChar *nameSpace);
1089XMLPUBFUN xmlNodePtr
1090 xmlStringGetNodeList (const xmlDoc *doc,
1091 const xmlChar *value);
1092XMLPUBFUN xmlNodePtr
1093 xmlStringLenGetNodeList (const xmlDoc *doc,
1094 const xmlChar *value,
1095 int len);
1096XMLPUBFUN xmlChar *
1097 xmlNodeListGetString (xmlDocPtr doc,
1098 const xmlNode *list,
1099 int inLine);
1100#ifdef LIBXML_TREE_ENABLED
1101XMLPUBFUN xmlChar *
1102 xmlNodeListGetRawString (const xmlDoc *doc,
1103 const xmlNode *list,
1104 int inLine);
1105#endif /* LIBXML_TREE_ENABLED */
1106XMLPUBFUN int
1107 xmlNodeSetContent (xmlNodePtr cur,
1108 const xmlChar *content);
1109#ifdef LIBXML_TREE_ENABLED
1110XMLPUBFUN int
1111 xmlNodeSetContentLen (xmlNodePtr cur,
1112 const xmlChar *content,
1113 int len);
1114#endif /* LIBXML_TREE_ENABLED */
1115XMLPUBFUN int
1116 xmlNodeAddContent (xmlNodePtr cur,
1117 const xmlChar *content);
1118XMLPUBFUN int
1119 xmlNodeAddContentLen (xmlNodePtr cur,
1120 const xmlChar *content,
1121 int len);
1122XMLPUBFUN xmlChar *
1123 xmlNodeGetContent (const xmlNode *cur);
1124
1125XMLPUBFUN int
1126 xmlNodeBufGetContent (xmlBufferPtr buffer,
1127 const xmlNode *cur);
1128XMLPUBFUN int
1129 xmlBufGetNodeContent (xmlBufPtr buf,
1130 const xmlNode *cur);
1131
1132XMLPUBFUN xmlChar *
1133 xmlNodeGetLang (const xmlNode *cur);
1134XMLPUBFUN int
1135 xmlNodeGetSpacePreserve (const xmlNode *cur);
1136#ifdef LIBXML_TREE_ENABLED
1137XMLPUBFUN int
1138 xmlNodeSetLang (xmlNodePtr cur,
1139 const xmlChar *lang);
1140XMLPUBFUN int
1141 xmlNodeSetSpacePreserve (xmlNodePtr cur,
1142 int val);
1143#endif /* LIBXML_TREE_ENABLED */
1144XMLPUBFUN int
1145 xmlNodeGetBaseSafe (const xmlDoc *doc,
1146 const xmlNode *cur,
1147 xmlChar **baseOut);
1148XMLPUBFUN xmlChar *
1149 xmlNodeGetBase (const xmlDoc *doc,
1150 const xmlNode *cur);
1151#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
1152XMLPUBFUN int
1153 xmlNodeSetBase (xmlNodePtr cur,
1154 const xmlChar *uri);
1155#endif
1156
1157/*
1158 * Removing content.
1159 */
1160XMLPUBFUN int
1161 xmlRemoveProp (xmlAttrPtr cur);
1162#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
1163XMLPUBFUN int
1164 xmlUnsetNsProp (xmlNodePtr node,
1165 xmlNsPtr ns,
1166 const xmlChar *name);
1167XMLPUBFUN int
1168 xmlUnsetProp (xmlNodePtr node,
1169 const xmlChar *name);
1170#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
1171
1172/*
1173 * Internal, don't use.
1174 */
1175XMLPUBFUN void
1176 xmlBufferWriteCHAR (xmlBufferPtr buf,
1177 const xmlChar *string);
1178XMLPUBFUN void
1179 xmlBufferWriteChar (xmlBufferPtr buf,
1180 const char *string);
1181XMLPUBFUN void
1182 xmlBufferWriteQuotedString(xmlBufferPtr buf,
1183 const xmlChar *string);
1184
1185#ifdef LIBXML_OUTPUT_ENABLED
1186XMLPUBFUN void xmlAttrSerializeTxtContent(xmlBufferPtr buf,
1187 xmlDocPtr doc,
1188 xmlAttrPtr attr,
1189 const xmlChar *string);
1190#endif /* LIBXML_OUTPUT_ENABLED */
1191
1192#ifdef LIBXML_TREE_ENABLED
1193/*
1194 * Namespace handling.
1195 */
1196XMLPUBFUN int
1197 xmlReconciliateNs (xmlDocPtr doc,
1198 xmlNodePtr tree);
1199#endif
1200
1201#ifdef LIBXML_OUTPUT_ENABLED
1202/*
1203 * Saving.
1204 */
1205XMLPUBFUN void
1206 xmlDocDumpFormatMemory (xmlDocPtr cur,
1207 xmlChar **mem,
1208 int *size,
1209 int format);
1210XMLPUBFUN void
1211 xmlDocDumpMemory (xmlDocPtr cur,
1212 xmlChar **mem,
1213 int *size);
1214XMLPUBFUN void
1215 xmlDocDumpMemoryEnc (xmlDocPtr out_doc,
1216 xmlChar **doc_txt_ptr,
1217 int * doc_txt_len,
1218 const char *txt_encoding);
1219XMLPUBFUN void
1220 xmlDocDumpFormatMemoryEnc(xmlDocPtr out_doc,
1221 xmlChar **doc_txt_ptr,
1222 int * doc_txt_len,
1223 const char *txt_encoding,
1224 int format);
1225XMLPUBFUN int
1226 xmlDocFormatDump (FILE *f,
1227 xmlDocPtr cur,
1228 int format);
1229XMLPUBFUN int
1230 xmlDocDump (FILE *f,
1231 xmlDocPtr cur);
1232XMLPUBFUN void
1233 xmlElemDump (FILE *f,
1234 xmlDocPtr doc,
1235 xmlNodePtr cur);
1236XMLPUBFUN int
1237 xmlSaveFile (const char *filename,
1238 xmlDocPtr cur);
1239XMLPUBFUN int
1240 xmlSaveFormatFile (const char *filename,
1241 xmlDocPtr cur,
1242 int format);
1243XMLPUBFUN size_t
1244 xmlBufNodeDump (xmlBufPtr buf,
1245 xmlDocPtr doc,
1246 xmlNodePtr cur,
1247 int level,
1248 int format);
1249XMLPUBFUN int
1250 xmlNodeDump (xmlBufferPtr buf,
1251 xmlDocPtr doc,
1252 xmlNodePtr cur,
1253 int level,
1254 int format);
1255
1256XMLPUBFUN int
1257 xmlSaveFileTo (xmlOutputBufferPtr buf,
1258 xmlDocPtr cur,
1259 const char *encoding);
1260XMLPUBFUN int
1261 xmlSaveFormatFileTo (xmlOutputBufferPtr buf,
1262 xmlDocPtr cur,
1263 const char *encoding,
1264 int format);
1265XMLPUBFUN void
1266 xmlNodeDumpOutput (xmlOutputBufferPtr buf,
1267 xmlDocPtr doc,
1268 xmlNodePtr cur,
1269 int level,
1270 int format,
1271 const char *encoding);
1272
1273XMLPUBFUN int
1274 xmlSaveFormatFileEnc (const char *filename,
1275 xmlDocPtr cur,
1276 const char *encoding,
1277 int format);
1278
1279XMLPUBFUN int
1280 xmlSaveFileEnc (const char *filename,
1281 xmlDocPtr cur,
1282 const char *encoding);
1283
1284#endif /* LIBXML_OUTPUT_ENABLED */
1285/*
1286 * XHTML
1287 */
1288XMLPUBFUN int
1289 xmlIsXHTML (const xmlChar *systemID,
1290 const xmlChar *publicID);
1291
1292/*
1293 * Compression.
1294 */
1295XMLPUBFUN int
1296 xmlGetDocCompressMode (const xmlDoc *doc);
1297XMLPUBFUN void
1298 xmlSetDocCompressMode (xmlDocPtr doc,
1299 int mode);
1300XML_DEPRECATED
1301XMLPUBFUN int
1302 xmlGetCompressMode (void);
1303XML_DEPRECATED
1304XMLPUBFUN void
1305 xmlSetCompressMode (int mode);
1306
1307/*
1308* DOM-wrapper helper functions.
1309*/
1310XMLPUBFUN xmlDOMWrapCtxtPtr
1311 xmlDOMWrapNewCtxt (void);
1312XMLPUBFUN void
1313 xmlDOMWrapFreeCtxt (xmlDOMWrapCtxtPtr ctxt);
1314XMLPUBFUN int
1315 xmlDOMWrapReconcileNamespaces(xmlDOMWrapCtxtPtr ctxt,
1316 xmlNodePtr elem,
1317 int options);
1318XMLPUBFUN int
1319 xmlDOMWrapAdoptNode (xmlDOMWrapCtxtPtr ctxt,
1320 xmlDocPtr sourceDoc,
1321 xmlNodePtr node,
1322 xmlDocPtr destDoc,
1323 xmlNodePtr destParent,
1324 int options);
1325XMLPUBFUN int
1326 xmlDOMWrapRemoveNode (xmlDOMWrapCtxtPtr ctxt,
1327 xmlDocPtr doc,
1328 xmlNodePtr node,
1329 int options);
1330XMLPUBFUN int
1331 xmlDOMWrapCloneNode (xmlDOMWrapCtxtPtr ctxt,
1332 xmlDocPtr sourceDoc,
1333 xmlNodePtr node,
1334 xmlNodePtr *clonedNode,
1335 xmlDocPtr destDoc,
1336 xmlNodePtr destParent,
1337 int deep,
1338 int options);
1339
1340#ifdef LIBXML_TREE_ENABLED
1341/*
1342 * 5 interfaces from DOM ElementTraversal, but different in entities
1343 * traversal.
1344 */
1345XMLPUBFUN unsigned long
1346 xmlChildElementCount (xmlNodePtr parent);
1347XMLPUBFUN xmlNodePtr
1348 xmlNextElementSibling (xmlNodePtr node);
1349XMLPUBFUN xmlNodePtr
1350 xmlFirstElementChild (xmlNodePtr parent);
1351XMLPUBFUN xmlNodePtr
1352 xmlLastElementChild (xmlNodePtr parent);
1353XMLPUBFUN xmlNodePtr
1354 xmlPreviousElementSibling (xmlNodePtr node);
1355#endif
1356
1357XML_DEPRECATED
1358XMLPUBFUN xmlRegisterNodeFunc
1359 xmlRegisterNodeDefault (xmlRegisterNodeFunc func);
1360XML_DEPRECATED
1361XMLPUBFUN xmlDeregisterNodeFunc
1362 xmlDeregisterNodeDefault (xmlDeregisterNodeFunc func);
1363XML_DEPRECATED
1364XMLPUBFUN xmlRegisterNodeFunc
1365 xmlThrDefRegisterNodeDefault(xmlRegisterNodeFunc func);
1366XML_DEPRECATED
1367XMLPUBFUN xmlDeregisterNodeFunc
1368 xmlThrDefDeregisterNodeDefault(xmlDeregisterNodeFunc func);
1369
1370XML_DEPRECATED XMLPUBFUN xmlBufferAllocationScheme
1371 xmlThrDefBufferAllocScheme (xmlBufferAllocationScheme v);
1372XML_DEPRECATED XMLPUBFUN int
1373 xmlThrDefDefaultBufferSize (int v);
1374
1375#ifdef __cplusplus
1376}
1377#endif
1378
1379#endif /* __XML_TREE_H__ */
1380
1381#endif /* XML_TREE_INTERNALS */
1382
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette