2 * tree.h : describes the structures found in an tree resulting
5 * See Copyright for the status of this software.
11 #ifndef __XML_TREE_H__
12 #define __XML_TREE_H__
15 #include <libxml/xmlversion.h>
22 * Some of the basic types pointer to structures:
25 typedef struct _xmlParserInputBuffer xmlParserInputBuffer;
26 typedef xmlParserInputBuffer *xmlParserInputBufferPtr;
28 typedef struct _xmlOutputBuffer xmlOutputBuffer;
29 typedef xmlOutputBuffer *xmlOutputBufferPtr;
32 typedef struct _xmlParserInput xmlParserInput;
33 typedef xmlParserInput *xmlParserInputPtr;
35 typedef struct _xmlParserCtxt xmlParserCtxt;
36 typedef xmlParserCtxt *xmlParserCtxtPtr;
38 typedef struct _xmlSAXLocator xmlSAXLocator;
39 typedef xmlSAXLocator *xmlSAXLocatorPtr;
41 typedef struct _xmlSAXHandler xmlSAXHandler;
42 typedef xmlSAXHandler *xmlSAXHandlerPtr;
45 typedef struct _xmlEntity xmlEntity;
46 typedef xmlEntity *xmlEntityPtr;
51 * default buffer size 4000.
53 #define BASE_BUFFER_SIZE 4000
58 * This is the namespace for the special xml: prefix predefined in the
59 * XML Namespace specification.
61 #define XML_XML_NAMESPACE \
62 (const xmlChar *) "http://www.w3.org/XML/1998/namespace"
65 * The different element types carried by an XML tree.
67 * NOTE: This is synchronized with DOM Level1 values
68 * See http://www.w3.org/TR/REC-DOM-Level-1/
70 * Actually this had diverged a bit, and now XML_DOCUMENT_TYPE_NODE should
71 * be deprecated to use an XML_DTD_NODE.
75 XML_ATTRIBUTE_NODE= 2,
77 XML_CDATA_SECTION_NODE= 4,
78 XML_ENTITY_REF_NODE= 5,
83 XML_DOCUMENT_TYPE_NODE= 10,
84 XML_DOCUMENT_FRAG_NODE= 11,
85 XML_NOTATION_NODE= 12,
86 XML_HTML_DOCUMENT_NODE= 13,
89 XML_ATTRIBUTE_DECL= 16,
91 XML_NAMESPACE_DECL= 18,
92 XML_XINCLUDE_START= 19,
94 #ifdef LIBXML_DOCB_ENABLED
95 ,XML_DOCB_DOCUMENT_NODE= 21
102 * This is a basic byte in an UTF-8 encoded string.
103 * It's unsigned allowing to pinpoint case where char * are assigned
104 * to xmlChar * (possibly making serialization back impossible).
107 typedef unsigned char xmlChar;
112 * Macro to cast a string to an xmlChar * when one know its safe.
114 #define BAD_CAST (xmlChar *)
119 * A DTD Notation definition.
122 typedef struct _xmlNotation xmlNotation;
123 typedef xmlNotation *xmlNotationPtr;
124 struct _xmlNotation {
125 const xmlChar *name; /* Notation name */
126 const xmlChar *PublicID; /* Public identifier, if any */
127 const xmlChar *SystemID; /* System identifier, if any */
133 * A DTD Attribute type definition.
137 XML_ATTRIBUTE_CDATA = 1,
139 XML_ATTRIBUTE_IDREF ,
140 XML_ATTRIBUTE_IDREFS,
141 XML_ATTRIBUTE_ENTITY,
142 XML_ATTRIBUTE_ENTITIES,
143 XML_ATTRIBUTE_NMTOKEN,
144 XML_ATTRIBUTE_NMTOKENS,
145 XML_ATTRIBUTE_ENUMERATION,
146 XML_ATTRIBUTE_NOTATION
150 * xmlAttributeDefault:
152 * A DTD Attribute default definition.
156 XML_ATTRIBUTE_NONE = 1,
157 XML_ATTRIBUTE_REQUIRED,
158 XML_ATTRIBUTE_IMPLIED,
160 } xmlAttributeDefault;
165 * List structure used when there is an enumeration in DTDs.
168 typedef struct _xmlEnumeration xmlEnumeration;
169 typedef xmlEnumeration *xmlEnumerationPtr;
170 struct _xmlEnumeration {
171 struct _xmlEnumeration *next; /* next one */
172 const xmlChar *name; /* Enumeration name */
178 * An Attribute declaration in a DTD.
181 typedef struct _xmlAttribute xmlAttribute;
182 typedef xmlAttribute *xmlAttributePtr;
183 struct _xmlAttribute {
184 void *_private; /* application data */
185 xmlElementType type; /* XML_ATTRIBUTE_DECL, must be second ! */
186 const xmlChar *name; /* Attribute name */
187 struct _xmlNode *children; /* NULL */
188 struct _xmlNode *last; /* NULL */
189 struct _xmlDtd *parent; /* -> DTD */
190 struct _xmlNode *next; /* next sibling link */
191 struct _xmlNode *prev; /* previous sibling link */
192 struct _xmlDoc *doc; /* the containing document */
194 struct _xmlAttribute *nexth; /* next in hash table */
195 xmlAttributeType atype; /* The attribute type */
196 xmlAttributeDefault def; /* the default */
197 const xmlChar *defaultValue; /* or the default value */
198 xmlEnumerationPtr tree; /* or the enumeration tree if any */
199 const xmlChar *prefix; /* the namespace prefix if any */
200 const xmlChar *elem; /* Element holding the attribute */
204 * xmlElementContentType:
206 * Possible definitions of element content types.
209 XML_ELEMENT_CONTENT_PCDATA = 1,
210 XML_ELEMENT_CONTENT_ELEMENT,
211 XML_ELEMENT_CONTENT_SEQ,
212 XML_ELEMENT_CONTENT_OR
213 } xmlElementContentType;
216 * xmlElementContentOccur:
218 * Possible definitions of element content occurrences.
221 XML_ELEMENT_CONTENT_ONCE = 1,
222 XML_ELEMENT_CONTENT_OPT,
223 XML_ELEMENT_CONTENT_MULT,
224 XML_ELEMENT_CONTENT_PLUS
225 } xmlElementContentOccur;
230 * An XML Element content as stored after parsing an element definition
234 typedef struct _xmlElementContent xmlElementContent;
235 typedef xmlElementContent *xmlElementContentPtr;
236 struct _xmlElementContent {
237 xmlElementContentType type; /* PCDATA, ELEMENT, SEQ or OR */
238 xmlElementContentOccur ocur; /* ONCE, OPT, MULT or PLUS */
239 const xmlChar *name; /* Element name */
240 struct _xmlElementContent *c1; /* first child */
241 struct _xmlElementContent *c2; /* second child */
242 struct _xmlElementContent *parent; /* parent */
243 const xmlChar *prefix; /* Namespace prefix */
249 * The different possibilities for an element content type.
253 XML_ELEMENT_TYPE_UNDEFINED = 0,
254 XML_ELEMENT_TYPE_EMPTY = 1,
255 XML_ELEMENT_TYPE_ANY,
256 XML_ELEMENT_TYPE_MIXED,
257 XML_ELEMENT_TYPE_ELEMENT
264 #include <libxml/xmlregexp.h>
272 * An XML Element declaration from a DTD.
275 typedef struct _xmlElement xmlElement;
276 typedef xmlElement *xmlElementPtr;
278 void *_private; /* application data */
279 xmlElementType type; /* XML_ELEMENT_DECL, must be second ! */
280 const xmlChar *name; /* Element name */
281 struct _xmlNode *children; /* NULL */
282 struct _xmlNode *last; /* NULL */
283 struct _xmlDtd *parent; /* -> DTD */
284 struct _xmlNode *next; /* next sibling link */
285 struct _xmlNode *prev; /* previous sibling link */
286 struct _xmlDoc *doc; /* the containing document */
288 xmlElementTypeVal etype; /* The type */
289 xmlElementContentPtr content; /* the allowed element content */
290 xmlAttributePtr attributes; /* List of the declared attributes */
291 const xmlChar *prefix; /* the namespace prefix if any */
292 #ifdef LIBXML_REGEXP_ENABLED
293 xmlRegexpPtr contModel; /* the validating regexp */
301 * XML_LOCAL_NAMESPACE:
303 * A namespace declaration node.
305 #define XML_LOCAL_NAMESPACE XML_NAMESPACE_DECL
306 typedef xmlElementType xmlNsType;
312 * Note that prefix == NULL is valid, it defines the default namespace
313 * within the subtree (until overridden).
315 * xmlNsType is unified with xmlElementType.
318 typedef struct _xmlNs xmlNs;
319 typedef xmlNs *xmlNsPtr;
321 struct _xmlNs *next; /* next Ns link for this node */
322 xmlNsType type; /* global or local */
323 const xmlChar *href; /* URL for the namespace */
324 const xmlChar *prefix; /* prefix for the namespace */
325 void *_private; /* application data */
331 * An XML DTD, as defined by <!DOCTYPE ... There is actually one for
332 * the internal subset and for the external subset.
334 typedef struct _xmlDtd xmlDtd;
335 typedef xmlDtd *xmlDtdPtr;
337 void *_private; /* application data */
338 xmlElementType type; /* XML_DTD_NODE, must be second ! */
339 const xmlChar *name; /* Name of the DTD */
340 struct _xmlNode *children; /* the value of the property link */
341 struct _xmlNode *last; /* last child link */
342 struct _xmlDoc *parent; /* child->parent link */
343 struct _xmlNode *next; /* next sibling link */
344 struct _xmlNode *prev; /* previous sibling link */
345 struct _xmlDoc *doc; /* the containing document */
347 /* End of common part */
348 void *notations; /* Hash table for notations if any */
349 void *elements; /* Hash table for elements if any */
350 void *attributes; /* Hash table for attributes if any */
351 void *entities; /* Hash table for entities if any */
352 const xmlChar *ExternalID; /* External identifier for PUBLIC DTD */
353 const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC DTD */
354 void *pentities; /* Hash table for param entities if any */
360 * An attribute on an XML node.
362 typedef struct _xmlAttr xmlAttr;
363 typedef xmlAttr *xmlAttrPtr;
365 void *_private; /* application data */
366 xmlElementType type; /* XML_ATTRIBUTE_NODE, must be second ! */
367 const xmlChar *name; /* the name of the property */
368 struct _xmlNode *children; /* the value of the property */
369 struct _xmlNode *last; /* NULL */
370 struct _xmlNode *parent; /* child->parent link */
371 struct _xmlAttr *next; /* next sibling link */
372 struct _xmlAttr *prev; /* previous sibling link */
373 struct _xmlDoc *doc; /* the containing document */
374 xmlNs *ns; /* pointer to the associated namespace */
375 xmlAttributeType atype; /* the attribute type if validating */
381 * An XML ID instance.
384 typedef struct _xmlID xmlID;
385 typedef xmlID *xmlIDPtr;
387 struct _xmlID *next; /* next ID */
388 const xmlChar *value; /* The ID name */
389 xmlAttrPtr attr; /* The attribute holding it */
390 const xmlChar *name; /* The attribute if attr is not available */
391 int lineno; /* The line number if attr is not available */
397 * An XML IDREF instance.
400 typedef struct _xmlRef xmlRef;
401 typedef xmlRef *xmlRefPtr;
403 struct _xmlRef *next; /* next Ref */
404 const xmlChar *value; /* The Ref name */
405 xmlAttrPtr attr; /* The attribute holding it */
406 const xmlChar *name; /* The attribute if attr is not available */
407 int lineno; /* The line number if attr is not available */
411 * xmlBufferAllocationScheme:
413 * A buffer allocation scheme can be defined to either match exactly the
414 * need or double it's allocated size each time it is found too small.
418 XML_BUFFER_ALLOC_DOUBLEIT,
419 XML_BUFFER_ALLOC_EXACT
420 } xmlBufferAllocationScheme;
425 * A buffer structure.
427 typedef struct _xmlBuffer xmlBuffer;
428 typedef xmlBuffer *xmlBufferPtr;
430 xmlChar *content; /* The buffer content UTF8 */
431 unsigned int use; /* The buffer size used */
432 unsigned int size; /* The buffer size */
433 xmlBufferAllocationScheme alloc; /* The realloc method */
439 * A node in an XML tree.
441 typedef struct _xmlNode xmlNode;
442 typedef xmlNode *xmlNodePtr;
444 void *_private; /* application data */
445 xmlElementType type; /* type number, must be second ! */
446 const xmlChar *name; /* the name of the node, or the entity */
447 struct _xmlNode *children; /* parent->childs link */
448 struct _xmlNode *last; /* last child link */
449 struct _xmlNode *parent; /* child->parent link */
450 struct _xmlNode *next; /* next sibling link */
451 struct _xmlNode *prev; /* previous sibling link */
452 struct _xmlDoc *doc; /* the containing document */
454 /* End of common part */
455 xmlNs *ns; /* pointer to the associated namespace */
456 xmlChar *content; /* the content */
457 struct _xmlAttr *properties;/* properties list */
458 xmlNs *nsDef; /* namespace definitions on this node */
464 * Macro to extract the content pointer of a node.
466 #define XML_GET_CONTENT(n) \
467 ((n)->type == XML_ELEMENT_NODE ? NULL : (n)->content)
472 * Macro to extract the line number of an element node.
473 * This will work only if line numbering is activated by
474 * calling xmlLineNumbersDefault(1) before parsing.
476 #define XML_GET_LINE(n) \
477 ((n)->type == XML_ELEMENT_NODE ? (int) (n)->content : 0)
484 typedef struct _xmlDoc xmlDoc;
485 typedef xmlDoc *xmlDocPtr;
487 void *_private; /* application data */
488 xmlElementType type; /* XML_DOCUMENT_NODE, must be second ! */
489 char *name; /* name/filename/URI of the document */
490 struct _xmlNode *children; /* the document tree */
491 struct _xmlNode *last; /* last child link */
492 struct _xmlNode *parent; /* child->parent link */
493 struct _xmlNode *next; /* next sibling link */
494 struct _xmlNode *prev; /* previous sibling link */
495 struct _xmlDoc *doc; /* autoreference to itself */
497 /* End of common part */
498 int compression;/* level of zlib compression */
499 int standalone; /* standalone document (no external refs) */
500 struct _xmlDtd *intSubset; /* the document internal subset */
501 struct _xmlDtd *extSubset; /* the document external subset */
502 struct _xmlNs *oldNs; /* Global namespace, the old way */
503 const xmlChar *version; /* the XML version string */
504 const xmlChar *encoding; /* external initial encoding, if any */
505 void *ids; /* Hash table for ID attributes if any */
506 void *refs; /* Hash table for IDREFs attributes if any */
507 const xmlChar *URL; /* The URI for that document */
508 int charset; /* encoding of the in-memory content
509 actually an xmlCharEncoding */
515 * Macro for compatibility naming layer with libxml1.
517 #ifndef xmlChildrenNode
518 #define xmlChildrenNode children
524 * Macro for compatibility naming layer with libxml1.
527 #define xmlRootNode children
534 LIBXML_DLL_IMPORT extern int oldXMLWDcompatibility;/* maintain compatibility with old WD */
535 LIBXML_DLL_IMPORT extern int xmlIndentTreeOutput; /* try to indent the tree dumps */
536 LIBXML_DLL_IMPORT extern xmlBufferAllocationScheme xmlBufferAllocScheme; /* alloc scheme to use */
537 LIBXML_DLL_IMPORT extern int xmlSaveNoEmptyTags; /* save empty tags as <empty></empty> */
538 LIBXML_DLL_IMPORT extern int xmlDefaultBufferSize; /* default buffer size */
542 * Some helper functions
544 int xmlValidateNCName (const xmlChar *value,
546 int xmlValidateQName (const xmlChar *value,
548 int xmlValidateName (const xmlChar *value,
550 int xmlValidateNMToken (const xmlChar *value,
553 xmlChar * xmlBuildQName (const xmlChar *ncname,
554 const xmlChar *prefix,
557 xmlChar * xmlSplitQName2 (const xmlChar *name,
559 const xmlChar * xmlSplitQName3 (const xmlChar *name,
566 void xmlSetBufferAllocationScheme(xmlBufferAllocationScheme scheme);
567 xmlBufferAllocationScheme xmlGetBufferAllocationScheme(void);
569 xmlBufferPtr xmlBufferCreate (void);
570 xmlBufferPtr xmlBufferCreateSize (size_t size);
571 int xmlBufferResize (xmlBufferPtr buf,
573 void xmlBufferFree (xmlBufferPtr buf);
574 int xmlBufferDump (FILE *file,
576 void xmlBufferAdd (xmlBufferPtr buf,
579 void xmlBufferAddHead (xmlBufferPtr buf,
582 void xmlBufferCat (xmlBufferPtr buf,
584 void xmlBufferCCat (xmlBufferPtr buf,
586 int xmlBufferShrink (xmlBufferPtr buf,
588 int xmlBufferGrow (xmlBufferPtr buf,
590 void xmlBufferEmpty (xmlBufferPtr buf);
591 const xmlChar* xmlBufferContent (const xmlBufferPtr buf);
592 void xmlBufferSetAllocationScheme(xmlBufferPtr buf,
593 xmlBufferAllocationScheme scheme);
594 int xmlBufferLength (const xmlBufferPtr buf);
597 * Creating/freeing new structures.
599 xmlDtdPtr xmlCreateIntSubset (xmlDocPtr doc,
601 const xmlChar *ExternalID,
602 const xmlChar *SystemID);
603 xmlDtdPtr xmlNewDtd (xmlDocPtr doc,
605 const xmlChar *ExternalID,
606 const xmlChar *SystemID);
607 xmlDtdPtr xmlGetIntSubset (xmlDocPtr doc);
608 void xmlFreeDtd (xmlDtdPtr cur);
609 xmlNsPtr xmlNewGlobalNs (xmlDocPtr doc,
611 const xmlChar *prefix);
612 xmlNsPtr xmlNewNs (xmlNodePtr node,
614 const xmlChar *prefix);
615 void xmlFreeNs (xmlNsPtr cur);
616 void xmlFreeNsList (xmlNsPtr cur);
617 xmlDocPtr xmlNewDoc (const xmlChar *version);
618 void xmlFreeDoc (xmlDocPtr cur);
619 xmlAttrPtr xmlNewDocProp (xmlDocPtr doc,
621 const xmlChar *value);
622 xmlAttrPtr xmlNewProp (xmlNodePtr node,
624 const xmlChar *value);
625 xmlAttrPtr xmlNewNsProp (xmlNodePtr node,
628 const xmlChar *value);
629 xmlAttrPtr xmlNewNsPropEatName (xmlNodePtr node,
632 const xmlChar *value);
633 void xmlFreePropList (xmlAttrPtr cur);
634 void xmlFreeProp (xmlAttrPtr cur);
635 xmlAttrPtr xmlCopyProp (xmlNodePtr target,
637 xmlAttrPtr xmlCopyPropList (xmlNodePtr target,
639 xmlDtdPtr xmlCopyDtd (xmlDtdPtr dtd);
640 xmlDocPtr xmlCopyDoc (xmlDocPtr doc,
644 * Creating new nodes.
646 xmlNodePtr xmlNewDocNode (xmlDocPtr doc,
649 const xmlChar *content);
650 xmlNodePtr xmlNewDocNodeEatName (xmlDocPtr doc,
653 const xmlChar *content);
654 xmlNodePtr xmlNewDocRawNode (xmlDocPtr doc,
657 const xmlChar *content);
658 xmlNodePtr xmlNewNode (xmlNsPtr ns,
659 const xmlChar *name);
660 xmlNodePtr xmlNewNodeEatName (xmlNsPtr ns,
662 xmlNodePtr xmlNewChild (xmlNodePtr parent,
665 const xmlChar *content);
666 xmlNodePtr xmlNewTextChild (xmlNodePtr parent,
669 const xmlChar *content);
670 xmlNodePtr xmlNewDocText (xmlDocPtr doc,
671 const xmlChar *content);
672 xmlNodePtr xmlNewText (const xmlChar *content);
673 xmlNodePtr xmlNewPI (const xmlChar *name,
674 const xmlChar *content);
675 xmlNodePtr xmlNewDocTextLen (xmlDocPtr doc,
676 const xmlChar *content,
678 xmlNodePtr xmlNewTextLen (const xmlChar *content,
680 xmlNodePtr xmlNewDocComment (xmlDocPtr doc,
681 const xmlChar *content);
682 xmlNodePtr xmlNewComment (const xmlChar *content);
683 xmlNodePtr xmlNewCDataBlock (xmlDocPtr doc,
684 const xmlChar *content,
686 xmlNodePtr xmlNewCharRef (xmlDocPtr doc,
687 const xmlChar *name);
688 xmlNodePtr xmlNewReference (xmlDocPtr doc,
689 const xmlChar *name);
690 xmlNodePtr xmlCopyNode (const xmlNodePtr node,
692 xmlNodePtr xmlDocCopyNode (const xmlNodePtr node,
695 xmlNodePtr xmlCopyNodeList (const xmlNodePtr node);
696 xmlNodePtr xmlNewDocFragment (xmlDocPtr doc);
701 long xmlGetLineNo (xmlNodePtr node);
702 xmlChar * xmlGetNodePath (xmlNodePtr node);
703 xmlNodePtr xmlDocGetRootElement (xmlDocPtr doc);
704 xmlNodePtr xmlGetLastChild (xmlNodePtr parent);
705 int xmlNodeIsText (xmlNodePtr node);
706 int xmlIsBlankNode (xmlNodePtr node);
709 * Changing the structure.
711 xmlNodePtr xmlDocSetRootElement (xmlDocPtr doc,
713 void xmlNodeSetName (xmlNodePtr cur,
714 const xmlChar *name);
715 xmlNodePtr xmlAddChild (xmlNodePtr parent,
717 xmlNodePtr xmlAddChildList (xmlNodePtr parent,
719 xmlNodePtr xmlReplaceNode (xmlNodePtr old,
721 xmlNodePtr xmlAddSibling (xmlNodePtr cur,
723 xmlNodePtr xmlAddPrevSibling (xmlNodePtr cur,
725 xmlNodePtr xmlAddNextSibling (xmlNodePtr cur,
727 void xmlUnlinkNode (xmlNodePtr cur);
728 xmlNodePtr xmlTextMerge (xmlNodePtr first,
730 int xmlTextConcat (xmlNodePtr node,
731 const xmlChar *content,
733 void xmlFreeNodeList (xmlNodePtr cur);
734 void xmlFreeNode (xmlNodePtr cur);
735 void xmlSetTreeDoc (xmlNodePtr tree,
737 void xmlSetListDoc (xmlNodePtr list,
743 xmlNsPtr xmlSearchNs (xmlDocPtr doc,
745 const xmlChar *nameSpace);
746 xmlNsPtr xmlSearchNsByHref (xmlDocPtr doc,
748 const xmlChar *href);
749 xmlNsPtr * xmlGetNsList (xmlDocPtr doc,
751 void xmlSetNs (xmlNodePtr node,
753 xmlNsPtr xmlCopyNamespace (xmlNsPtr cur);
754 xmlNsPtr xmlCopyNamespaceList (xmlNsPtr cur);
757 * Changing the content.
759 xmlAttrPtr xmlSetProp (xmlNodePtr node,
761 const xmlChar *value);
762 xmlChar * xmlGetProp (xmlNodePtr node,
763 const xmlChar *name);
764 xmlChar * xmlGetNoNsProp (xmlNodePtr node,
765 const xmlChar *name);
766 xmlAttrPtr xmlHasProp (xmlNodePtr node,
767 const xmlChar *name);
768 xmlAttrPtr xmlHasNsProp (xmlNodePtr node,
770 const xmlChar *nameSpace);
771 xmlAttrPtr xmlSetNsProp (xmlNodePtr node,
774 const xmlChar *value);
775 xmlChar * xmlGetNsProp (xmlNodePtr node,
777 const xmlChar *nameSpace);
778 xmlNodePtr xmlStringGetNodeList (xmlDocPtr doc,
779 const xmlChar *value);
780 xmlNodePtr xmlStringLenGetNodeList (xmlDocPtr doc,
781 const xmlChar *value,
783 xmlChar * xmlNodeListGetString (xmlDocPtr doc,
786 xmlChar * xmlNodeListGetRawString (xmlDocPtr doc,
789 void xmlNodeSetContent (xmlNodePtr cur,
790 const xmlChar *content);
791 void xmlNodeSetContentLen (xmlNodePtr cur,
792 const xmlChar *content,
794 void xmlNodeAddContent (xmlNodePtr cur,
795 const xmlChar *content);
796 void xmlNodeAddContentLen (xmlNodePtr cur,
797 const xmlChar *content,
799 xmlChar * xmlNodeGetContent (xmlNodePtr cur);
800 xmlChar * xmlNodeGetLang (xmlNodePtr cur);
801 void xmlNodeSetLang (xmlNodePtr cur,
802 const xmlChar *lang);
803 int xmlNodeGetSpacePreserve (xmlNodePtr cur);
804 void xmlNodeSetSpacePreserve (xmlNodePtr cur,
806 xmlChar * xmlNodeGetBase (xmlDocPtr doc,
808 void xmlNodeSetBase (xmlNodePtr cur,
814 int xmlRemoveProp (xmlAttrPtr cur);
815 int xmlUnsetProp (xmlNodePtr node,
816 const xmlChar *name);
817 int xmlUnsetNsProp (xmlNodePtr node,
819 const xmlChar *name);
822 * Internal, don't use.
824 void xmlBufferWriteCHAR (xmlBufferPtr buf,
825 const xmlChar *string);
826 void xmlBufferWriteChar (xmlBufferPtr buf,
828 void xmlBufferWriteQuotedString(xmlBufferPtr buf,
829 const xmlChar *string);
832 * Namespace handling.
834 int xmlReconciliateNs (xmlDocPtr doc,
840 void xmlDocDumpFormatMemory (xmlDocPtr cur,
844 void xmlDocDumpMemory (xmlDocPtr cur,
847 void xmlDocDumpMemoryEnc (xmlDocPtr out_doc,
848 xmlChar **doc_txt_ptr,
850 const char *txt_encoding);
851 void xmlDocDumpFormatMemoryEnc(xmlDocPtr out_doc,
852 xmlChar **doc_txt_ptr,
854 const char *txt_encoding,
856 int xmlDocFormatDump(FILE *f,
859 int xmlDocDump (FILE *f,
861 void xmlElemDump (FILE *f,
864 int xmlSaveFile (const char *filename,
866 int xmlSaveFormatFile (const char *filename,
869 int xmlNodeDump (xmlBufferPtr buf,
875 int xmlSaveFileTo (xmlOutputBufferPtr buf,
877 const char *encoding);
878 int xmlSaveFormatFileTo (xmlOutputBufferPtr buf,
880 const char *encoding,
882 void xmlNodeDumpOutput (xmlOutputBufferPtr buf,
887 const char *encoding);
889 int xmlSaveFormatFileEnc (const char *filename,
891 const char *encoding,
894 int xmlSaveFileEnc (const char *filename,
896 const char *encoding);
901 int xmlIsXHTML (const xmlChar *systemID,
902 const xmlChar *publicID);
907 int xmlGetDocCompressMode (xmlDocPtr doc);
908 void xmlSetDocCompressMode (xmlDocPtr doc,
910 int xmlGetCompressMode (void);
911 void xmlSetCompressMode (int mode);
916 #ifndef __XML_PARSER_H__
917 #include <libxml/xmlmemory.h>
920 #endif /* __XML_TREE_H__ */