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