Annotation of win32/gnome/gnome-xml/include/libxml/tree.h, revision 1.1
1.1 ! paf 1: /*
! 2: * tree.h : describes the structures found in an tree resulting
! 3: * from an XML parsing.
! 4: *
! 5: * See Copyright for the status of this software.
! 6: *
! 7: * daniel@veillard.com
! 8: *
! 9: */
! 10:
! 11: #ifndef __XML_TREE_H__
! 12: #define __XML_TREE_H__
! 13:
! 14: #include <stdio.h>
! 15: #include <libxml/xmlversion.h>
! 16:
! 17: #ifdef __cplusplus
! 18: extern "C" {
! 19: #endif
! 20:
! 21: /*
! 22: * Some of the basic types pointer to structures:
! 23: */
! 24: /* xmlIO.h */
! 25: typedef struct _xmlParserInputBuffer xmlParserInputBuffer;
! 26: typedef xmlParserInputBuffer *xmlParserInputBufferPtr;
! 27:
! 28: typedef struct _xmlOutputBuffer xmlOutputBuffer;
! 29: typedef xmlOutputBuffer *xmlOutputBufferPtr;
! 30:
! 31: /* parser.h */
! 32: typedef struct _xmlParserInput xmlParserInput;
! 33: typedef xmlParserInput *xmlParserInputPtr;
! 34:
! 35: typedef struct _xmlParserCtxt xmlParserCtxt;
! 36: typedef xmlParserCtxt *xmlParserCtxtPtr;
! 37:
! 38: typedef struct _xmlSAXLocator xmlSAXLocator;
! 39: typedef xmlSAXLocator *xmlSAXLocatorPtr;
! 40:
! 41: typedef struct _xmlSAXHandler xmlSAXHandler;
! 42: typedef xmlSAXHandler *xmlSAXHandlerPtr;
! 43:
! 44: /* entities.h */
! 45: typedef struct _xmlEntity xmlEntity;
! 46: typedef xmlEntity *xmlEntityPtr;
! 47:
! 48: /**
! 49: * BASE_BUFFER_SIZE:
! 50: *
! 51: * default buffer size 4000.
! 52: */
! 53: #define BASE_BUFFER_SIZE 4000
! 54:
! 55: /**
! 56: * XML_XML_NAMESPACE:
! 57: *
! 58: * This is the namespace for the special xml: prefix predefined in the
! 59: * XML Namespace specification.
! 60: */
! 61: #define XML_XML_NAMESPACE \
! 62: (const xmlChar *) "http://www.w3.org/XML/1998/namespace"
! 63:
! 64: /*
! 65: * The different element types carried by an XML tree.
! 66: *
! 67: * NOTE: This is synchronized with DOM Level1 values
! 68: * See http://www.w3.org/TR/REC-DOM-Level-1/
! 69: *
! 70: * Actually this had diverged a bit, and now XML_DOCUMENT_TYPE_NODE should
! 71: * be deprecated to use an XML_DTD_NODE.
! 72: */
! 73: typedef enum {
! 74: XML_ELEMENT_NODE= 1,
! 75: XML_ATTRIBUTE_NODE= 2,
! 76: XML_TEXT_NODE= 3,
! 77: XML_CDATA_SECTION_NODE= 4,
! 78: XML_ENTITY_REF_NODE= 5,
! 79: XML_ENTITY_NODE= 6,
! 80: XML_PI_NODE= 7,
! 81: XML_COMMENT_NODE= 8,
! 82: XML_DOCUMENT_NODE= 9,
! 83: XML_DOCUMENT_TYPE_NODE= 10,
! 84: XML_DOCUMENT_FRAG_NODE= 11,
! 85: XML_NOTATION_NODE= 12,
! 86: XML_HTML_DOCUMENT_NODE= 13,
! 87: XML_DTD_NODE= 14,
! 88: XML_ELEMENT_DECL= 15,
! 89: XML_ATTRIBUTE_DECL= 16,
! 90: XML_ENTITY_DECL= 17,
! 91: XML_NAMESPACE_DECL= 18,
! 92: XML_XINCLUDE_START= 19,
! 93: XML_XINCLUDE_END= 20
! 94: #ifdef LIBXML_DOCB_ENABLED
! 95: ,XML_DOCB_DOCUMENT_NODE= 21
! 96: #endif
! 97: } xmlElementType;
! 98:
! 99: /**
! 100: * xmlChar:
! 101: *
! 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).
! 105: */
! 106:
! 107: typedef unsigned char xmlChar;
! 108:
! 109: /**
! 110: * BAD_CAST:
! 111: *
! 112: * Macro to cast a string to an xmlChar * when one know its safe.
! 113: */
! 114: #define BAD_CAST (xmlChar *)
! 115:
! 116: /**
! 117: * xmlNotation:
! 118: *
! 119: * A DTD Notation definition.
! 120: */
! 121:
! 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 */
! 128: };
! 129:
! 130: /**
! 131: * xmlAttributeType:
! 132: *
! 133: * A DTD Attribute type definition.
! 134: */
! 135:
! 136: typedef enum {
! 137: XML_ATTRIBUTE_CDATA = 1,
! 138: XML_ATTRIBUTE_ID,
! 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
! 147: } xmlAttributeType;
! 148:
! 149: /**
! 150: * xmlAttributeDefault:
! 151: *
! 152: * A DTD Attribute default definition.
! 153: */
! 154:
! 155: typedef enum {
! 156: XML_ATTRIBUTE_NONE = 1,
! 157: XML_ATTRIBUTE_REQUIRED,
! 158: XML_ATTRIBUTE_IMPLIED,
! 159: XML_ATTRIBUTE_FIXED
! 160: } xmlAttributeDefault;
! 161:
! 162: /**
! 163: * xmlEnumeration:
! 164: *
! 165: * List structure used when there is an enumeration in DTDs.
! 166: */
! 167:
! 168: typedef struct _xmlEnumeration xmlEnumeration;
! 169: typedef xmlEnumeration *xmlEnumerationPtr;
! 170: struct _xmlEnumeration {
! 171: struct _xmlEnumeration *next; /* next one */
! 172: const xmlChar *name; /* Enumeration name */
! 173: };
! 174:
! 175: /**
! 176: * xmlAttribute:
! 177: *
! 178: * An Attribute declaration in a DTD.
! 179: */
! 180:
! 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 */
! 193:
! 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 */
! 201: };
! 202:
! 203: /**
! 204: * xmlElementContentType:
! 205: *
! 206: * Possible definitions of element content types.
! 207: */
! 208: typedef enum {
! 209: XML_ELEMENT_CONTENT_PCDATA = 1,
! 210: XML_ELEMENT_CONTENT_ELEMENT,
! 211: XML_ELEMENT_CONTENT_SEQ,
! 212: XML_ELEMENT_CONTENT_OR
! 213: } xmlElementContentType;
! 214:
! 215: /**
! 216: * xmlElementContentOccur:
! 217: *
! 218: * Possible definitions of element content occurrences.
! 219: */
! 220: typedef enum {
! 221: XML_ELEMENT_CONTENT_ONCE = 1,
! 222: XML_ELEMENT_CONTENT_OPT,
! 223: XML_ELEMENT_CONTENT_MULT,
! 224: XML_ELEMENT_CONTENT_PLUS
! 225: } xmlElementContentOccur;
! 226:
! 227: /**
! 228: * xmlElementContent:
! 229: *
! 230: * An XML Element content as stored after parsing an element definition
! 231: * in a DTD.
! 232: */
! 233:
! 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 */
! 244: };
! 245:
! 246: /**
! 247: * xmlElementTypeVal:
! 248: *
! 249: * The different possibilities for an element content type.
! 250: */
! 251:
! 252: typedef enum {
! 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
! 258: } xmlElementTypeVal;
! 259:
! 260:
! 261: #ifdef __cplusplus
! 262: }
! 263: #endif
! 264: #include <libxml/xmlregexp.h>
! 265: #ifdef __cplusplus
! 266: extern "C" {
! 267: #endif
! 268:
! 269: /**
! 270: * xmlElement:
! 271: *
! 272: * An XML Element declaration from a DTD.
! 273: */
! 274:
! 275: typedef struct _xmlElement xmlElement;
! 276: typedef xmlElement *xmlElementPtr;
! 277: struct _xmlElement {
! 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 */
! 287:
! 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 */
! 294: #else
! 295: void *contModel;
! 296: #endif
! 297: };
! 298:
! 299:
! 300: /**
! 301: * XML_LOCAL_NAMESPACE:
! 302: *
! 303: * A namespace declaration node.
! 304: */
! 305: #define XML_LOCAL_NAMESPACE XML_NAMESPACE_DECL
! 306: typedef xmlElementType xmlNsType;
! 307:
! 308: /**
! 309: * xmlNs:
! 310: *
! 311: * An XML namespace.
! 312: * Note that prefix == NULL is valid, it defines the default namespace
! 313: * within the subtree (until overridden).
! 314: *
! 315: * xmlNsType is unified with xmlElementType.
! 316: */
! 317:
! 318: typedef struct _xmlNs xmlNs;
! 319: typedef xmlNs *xmlNsPtr;
! 320: struct _xmlNs {
! 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 */
! 326: };
! 327:
! 328: /**
! 329: * xmlDtd:
! 330: *
! 331: * An XML DTD, as defined by <!DOCTYPE ... There is actually one for
! 332: * the internal subset and for the external subset.
! 333: */
! 334: typedef struct _xmlDtd xmlDtd;
! 335: typedef xmlDtd *xmlDtdPtr;
! 336: struct _xmlDtd {
! 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 */
! 346:
! 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 */
! 355: };
! 356:
! 357: /**
! 358: * xmlAttr:
! 359: *
! 360: * An attribute on an XML node.
! 361: */
! 362: typedef struct _xmlAttr xmlAttr;
! 363: typedef xmlAttr *xmlAttrPtr;
! 364: struct _xmlAttr {
! 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 */
! 376: };
! 377:
! 378: /**
! 379: * xmlID:
! 380: *
! 381: * An XML ID instance.
! 382: */
! 383:
! 384: typedef struct _xmlID xmlID;
! 385: typedef xmlID *xmlIDPtr;
! 386: struct _xmlID {
! 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 */
! 392: };
! 393:
! 394: /**
! 395: * xmlRef:
! 396: *
! 397: * An XML IDREF instance.
! 398: */
! 399:
! 400: typedef struct _xmlRef xmlRef;
! 401: typedef xmlRef *xmlRefPtr;
! 402: struct _xmlRef {
! 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 */
! 408: };
! 409:
! 410: /**
! 411: * xmlBufferAllocationScheme:
! 412: *
! 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.
! 415: */
! 416:
! 417: typedef enum {
! 418: XML_BUFFER_ALLOC_DOUBLEIT,
! 419: XML_BUFFER_ALLOC_EXACT
! 420: } xmlBufferAllocationScheme;
! 421:
! 422: /**
! 423: * xmlBuffer:
! 424: *
! 425: * A buffer structure.
! 426: */
! 427: typedef struct _xmlBuffer xmlBuffer;
! 428: typedef xmlBuffer *xmlBufferPtr;
! 429: struct _xmlBuffer {
! 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 */
! 434: };
! 435:
! 436: /**
! 437: * xmlNode:
! 438: *
! 439: * A node in an XML tree.
! 440: */
! 441: typedef struct _xmlNode xmlNode;
! 442: typedef xmlNode *xmlNodePtr;
! 443: struct _xmlNode {
! 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 */
! 453:
! 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 */
! 459: };
! 460:
! 461: /**
! 462: * XML_GET_CONTENT:
! 463: *
! 464: * Macro to extract the content pointer of a node.
! 465: */
! 466: #define XML_GET_CONTENT(n) \
! 467: ((n)->type == XML_ELEMENT_NODE ? NULL : (n)->content)
! 468:
! 469: /**
! 470: * XML_GET_LINE:
! 471: *
! 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.
! 475: */
! 476: #define XML_GET_LINE(n) \
! 477: ((n)->type == XML_ELEMENT_NODE ? (int) (n)->content : 0)
! 478:
! 479: /**
! 480: * xmlDoc:
! 481: *
! 482: * An XML document.
! 483: */
! 484: typedef struct _xmlDoc xmlDoc;
! 485: typedef xmlDoc *xmlDocPtr;
! 486: struct _xmlDoc {
! 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 */
! 496:
! 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 */
! 510: };
! 511:
! 512: /**
! 513: * xmlChildrenNode:
! 514: *
! 515: * Macro for compatibility naming layer with libxml1.
! 516: */
! 517: #ifndef xmlChildrenNode
! 518: #define xmlChildrenNode children
! 519: #endif
! 520:
! 521: /**
! 522: * xmlRootNode:
! 523: *
! 524: * Macro for compatibility naming layer with libxml1.
! 525: */
! 526: #ifndef xmlRootNode
! 527: #define xmlRootNode children
! 528: #endif
! 529:
! 530: /*
! 531: * Variables.
! 532: */
! 533: #if 0
! 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 */
! 539: #endif
! 540:
! 541: int xmlValidateNCName (const xmlChar *value, int space);
! 542: int xmlValidateQName (const xmlChar *value, int space);
! 543: int xmlValidateName (const xmlChar *value, int space);
! 544: int xmlValidateNMToken (const xmlChar *value, int space);
! 545:
! 546: /*
! 547: * Handling Buffers.
! 548: */
! 549:
! 550: void xmlSetBufferAllocationScheme(xmlBufferAllocationScheme scheme);
! 551: xmlBufferAllocationScheme xmlGetBufferAllocationScheme(void);
! 552:
! 553: xmlBufferPtr xmlBufferCreate (void);
! 554: xmlBufferPtr xmlBufferCreateSize (size_t size);
! 555: int xmlBufferResize (xmlBufferPtr buf,
! 556: unsigned int size);
! 557: void xmlBufferFree (xmlBufferPtr buf);
! 558: int xmlBufferDump (FILE *file,
! 559: xmlBufferPtr buf);
! 560: void xmlBufferAdd (xmlBufferPtr buf,
! 561: const xmlChar *str,
! 562: int len);
! 563: void xmlBufferAddHead (xmlBufferPtr buf,
! 564: const xmlChar *str,
! 565: int len);
! 566: void xmlBufferCat (xmlBufferPtr buf,
! 567: const xmlChar *str);
! 568: void xmlBufferCCat (xmlBufferPtr buf,
! 569: const char *str);
! 570: int xmlBufferShrink (xmlBufferPtr buf,
! 571: unsigned int len);
! 572: int xmlBufferGrow (xmlBufferPtr buf,
! 573: unsigned int len);
! 574: void xmlBufferEmpty (xmlBufferPtr buf);
! 575: const xmlChar* xmlBufferContent (const xmlBufferPtr buf);
! 576: void xmlBufferSetAllocationScheme(xmlBufferPtr buf,
! 577: xmlBufferAllocationScheme scheme);
! 578: int xmlBufferLength (const xmlBufferPtr buf);
! 579:
! 580: /*
! 581: * Creating/freeing new structures.
! 582: */
! 583: xmlDtdPtr xmlCreateIntSubset (xmlDocPtr doc,
! 584: const xmlChar *name,
! 585: const xmlChar *ExternalID,
! 586: const xmlChar *SystemID);
! 587: xmlDtdPtr xmlNewDtd (xmlDocPtr doc,
! 588: const xmlChar *name,
! 589: const xmlChar *ExternalID,
! 590: const xmlChar *SystemID);
! 591: xmlDtdPtr xmlGetIntSubset (xmlDocPtr doc);
! 592: void xmlFreeDtd (xmlDtdPtr cur);
! 593: xmlNsPtr xmlNewGlobalNs (xmlDocPtr doc,
! 594: const xmlChar *href,
! 595: const xmlChar *prefix);
! 596: xmlNsPtr xmlNewNs (xmlNodePtr node,
! 597: const xmlChar *href,
! 598: const xmlChar *prefix);
! 599: void xmlFreeNs (xmlNsPtr cur);
! 600: void xmlFreeNsList (xmlNsPtr cur);
! 601: xmlDocPtr xmlNewDoc (const xmlChar *version);
! 602: void xmlFreeDoc (xmlDocPtr cur);
! 603: xmlAttrPtr xmlNewDocProp (xmlDocPtr doc,
! 604: const xmlChar *name,
! 605: const xmlChar *value);
! 606: xmlAttrPtr xmlNewProp (xmlNodePtr node,
! 607: const xmlChar *name,
! 608: const xmlChar *value);
! 609: xmlAttrPtr xmlNewNsProp (xmlNodePtr node,
! 610: xmlNsPtr ns,
! 611: const xmlChar *name,
! 612: const xmlChar *value);
! 613: xmlAttrPtr xmlNewNsPropEatName (xmlNodePtr node,
! 614: xmlNsPtr ns,
! 615: xmlChar *name,
! 616: const xmlChar *value);
! 617: void xmlFreePropList (xmlAttrPtr cur);
! 618: void xmlFreeProp (xmlAttrPtr cur);
! 619: xmlAttrPtr xmlCopyProp (xmlNodePtr target,
! 620: xmlAttrPtr cur);
! 621: xmlAttrPtr xmlCopyPropList (xmlNodePtr target,
! 622: xmlAttrPtr cur);
! 623: xmlDtdPtr xmlCopyDtd (xmlDtdPtr dtd);
! 624: xmlDocPtr xmlCopyDoc (xmlDocPtr doc,
! 625: int recursive);
! 626:
! 627: /*
! 628: * Creating new nodes.
! 629: */
! 630: xmlNodePtr xmlNewDocNode (xmlDocPtr doc,
! 631: xmlNsPtr ns,
! 632: const xmlChar *name,
! 633: const xmlChar *content);
! 634: xmlNodePtr xmlNewDocNodeEatName (xmlDocPtr doc,
! 635: xmlNsPtr ns,
! 636: xmlChar *name,
! 637: const xmlChar *content);
! 638: xmlNodePtr xmlNewDocRawNode (xmlDocPtr doc,
! 639: xmlNsPtr ns,
! 640: const xmlChar *name,
! 641: const xmlChar *content);
! 642: xmlNodePtr xmlNewNode (xmlNsPtr ns,
! 643: const xmlChar *name);
! 644: xmlNodePtr xmlNewNodeEatName (xmlNsPtr ns,
! 645: xmlChar *name);
! 646: xmlNodePtr xmlNewChild (xmlNodePtr parent,
! 647: xmlNsPtr ns,
! 648: const xmlChar *name,
! 649: const xmlChar *content);
! 650: xmlNodePtr xmlNewTextChild (xmlNodePtr parent,
! 651: xmlNsPtr ns,
! 652: const xmlChar *name,
! 653: const xmlChar *content);
! 654: xmlNodePtr xmlNewDocText (xmlDocPtr doc,
! 655: const xmlChar *content);
! 656: xmlNodePtr xmlNewText (const xmlChar *content);
! 657: xmlNodePtr xmlNewPI (const xmlChar *name,
! 658: const xmlChar *content);
! 659: xmlNodePtr xmlNewDocTextLen (xmlDocPtr doc,
! 660: const xmlChar *content,
! 661: int len);
! 662: xmlNodePtr xmlNewTextLen (const xmlChar *content,
! 663: int len);
! 664: xmlNodePtr xmlNewDocComment (xmlDocPtr doc,
! 665: const xmlChar *content);
! 666: xmlNodePtr xmlNewComment (const xmlChar *content);
! 667: xmlNodePtr xmlNewCDataBlock (xmlDocPtr doc,
! 668: const xmlChar *content,
! 669: int len);
! 670: xmlNodePtr xmlNewCharRef (xmlDocPtr doc,
! 671: const xmlChar *name);
! 672: xmlNodePtr xmlNewReference (xmlDocPtr doc,
! 673: const xmlChar *name);
! 674: xmlNodePtr xmlCopyNode (const xmlNodePtr node,
! 675: int recursive);
! 676: xmlNodePtr xmlDocCopyNode (const xmlNodePtr node,
! 677: xmlDocPtr doc,
! 678: int recursive);
! 679: xmlNodePtr xmlCopyNodeList (const xmlNodePtr node);
! 680: xmlNodePtr xmlNewDocFragment (xmlDocPtr doc);
! 681:
! 682: /*
! 683: * Navigating.
! 684: */
! 685: long xmlGetLineNo (xmlNodePtr node);
! 686: xmlChar * xmlGetNodePath (xmlNodePtr node);
! 687: xmlNodePtr xmlDocGetRootElement (xmlDocPtr doc);
! 688: xmlNodePtr xmlGetLastChild (xmlNodePtr parent);
! 689: int xmlNodeIsText (xmlNodePtr node);
! 690: int xmlIsBlankNode (xmlNodePtr node);
! 691:
! 692: /*
! 693: * Changing the structure.
! 694: */
! 695: xmlNodePtr xmlDocSetRootElement (xmlDocPtr doc,
! 696: xmlNodePtr root);
! 697: void xmlNodeSetName (xmlNodePtr cur,
! 698: const xmlChar *name);
! 699: xmlNodePtr xmlAddChild (xmlNodePtr parent,
! 700: xmlNodePtr cur);
! 701: xmlNodePtr xmlAddChildList (xmlNodePtr parent,
! 702: xmlNodePtr cur);
! 703: xmlNodePtr xmlReplaceNode (xmlNodePtr old,
! 704: xmlNodePtr cur);
! 705: xmlNodePtr xmlAddSibling (xmlNodePtr cur,
! 706: xmlNodePtr elem);
! 707: xmlNodePtr xmlAddPrevSibling (xmlNodePtr cur,
! 708: xmlNodePtr elem);
! 709: xmlNodePtr xmlAddNextSibling (xmlNodePtr cur,
! 710: xmlNodePtr elem);
! 711: void xmlUnlinkNode (xmlNodePtr cur);
! 712: xmlNodePtr xmlTextMerge (xmlNodePtr first,
! 713: xmlNodePtr second);
! 714: void xmlTextConcat (xmlNodePtr node,
! 715: const xmlChar *content,
! 716: int len);
! 717: void xmlFreeNodeList (xmlNodePtr cur);
! 718: void xmlFreeNode (xmlNodePtr cur);
! 719: void xmlSetTreeDoc (xmlNodePtr tree,
! 720: xmlDocPtr doc);
! 721: void xmlSetListDoc (xmlNodePtr list,
! 722: xmlDocPtr doc);
! 723:
! 724: /*
! 725: * Namespaces.
! 726: */
! 727: xmlNsPtr xmlSearchNs (xmlDocPtr doc,
! 728: xmlNodePtr node,
! 729: const xmlChar *nameSpace);
! 730: xmlNsPtr xmlSearchNsByHref (xmlDocPtr doc,
! 731: xmlNodePtr node,
! 732: const xmlChar *href);
! 733: xmlNsPtr * xmlGetNsList (xmlDocPtr doc,
! 734: xmlNodePtr node);
! 735: void xmlSetNs (xmlNodePtr node,
! 736: xmlNsPtr ns);
! 737: xmlNsPtr xmlCopyNamespace (xmlNsPtr cur);
! 738: xmlNsPtr xmlCopyNamespaceList (xmlNsPtr cur);
! 739:
! 740: /*
! 741: * Changing the content.
! 742: */
! 743: xmlAttrPtr xmlSetProp (xmlNodePtr node,
! 744: const xmlChar *name,
! 745: const xmlChar *value);
! 746: xmlChar * xmlGetProp (xmlNodePtr node,
! 747: const xmlChar *name);
! 748: xmlChar * xmlGetNoNsProp (xmlNodePtr node,
! 749: const xmlChar *name);
! 750: xmlAttrPtr xmlHasProp (xmlNodePtr node,
! 751: const xmlChar *name);
! 752: xmlAttrPtr xmlHasNsProp (xmlNodePtr node,
! 753: const xmlChar *name,
! 754: const xmlChar *nameSpace);
! 755: xmlAttrPtr xmlSetNsProp (xmlNodePtr node,
! 756: xmlNsPtr ns,
! 757: const xmlChar *name,
! 758: const xmlChar *value);
! 759: xmlChar * xmlGetNsProp (xmlNodePtr node,
! 760: const xmlChar *name,
! 761: const xmlChar *nameSpace);
! 762: xmlNodePtr xmlStringGetNodeList (xmlDocPtr doc,
! 763: const xmlChar *value);
! 764: xmlNodePtr xmlStringLenGetNodeList (xmlDocPtr doc,
! 765: const xmlChar *value,
! 766: int len);
! 767: xmlChar * xmlNodeListGetString (xmlDocPtr doc,
! 768: xmlNodePtr list,
! 769: int inLine);
! 770: xmlChar * xmlNodeListGetRawString (xmlDocPtr doc,
! 771: xmlNodePtr list,
! 772: int inLine);
! 773: void xmlNodeSetContent (xmlNodePtr cur,
! 774: const xmlChar *content);
! 775: void xmlNodeSetContentLen (xmlNodePtr cur,
! 776: const xmlChar *content,
! 777: int len);
! 778: void xmlNodeAddContent (xmlNodePtr cur,
! 779: const xmlChar *content);
! 780: void xmlNodeAddContentLen (xmlNodePtr cur,
! 781: const xmlChar *content,
! 782: int len);
! 783: xmlChar * xmlNodeGetContent (xmlNodePtr cur);
! 784: xmlChar * xmlNodeGetLang (xmlNodePtr cur);
! 785: void xmlNodeSetLang (xmlNodePtr cur,
! 786: const xmlChar *lang);
! 787: int xmlNodeGetSpacePreserve (xmlNodePtr cur);
! 788: void xmlNodeSetSpacePreserve (xmlNodePtr cur,
! 789: int val);
! 790: xmlChar * xmlNodeGetBase (xmlDocPtr doc,
! 791: xmlNodePtr cur);
! 792: void xmlNodeSetBase (xmlNodePtr cur,
! 793: xmlChar *uri);
! 794:
! 795: /*
! 796: * Removing content.
! 797: */
! 798: int xmlRemoveProp (xmlAttrPtr cur);
! 799: int xmlUnsetProp (xmlNodePtr node,
! 800: const xmlChar *name);
! 801: int xmlUnsetNsProp (xmlNodePtr node,
! 802: xmlNsPtr ns,
! 803: const xmlChar *name);
! 804:
! 805: /*
! 806: * Internal, don't use.
! 807: */
! 808: void xmlBufferWriteCHAR (xmlBufferPtr buf,
! 809: const xmlChar *string);
! 810: void xmlBufferWriteChar (xmlBufferPtr buf,
! 811: const char *string);
! 812: void xmlBufferWriteQuotedString(xmlBufferPtr buf,
! 813: const xmlChar *string);
! 814:
! 815: /*
! 816: * Namespace handling.
! 817: */
! 818: int xmlReconciliateNs (xmlDocPtr doc,
! 819: xmlNodePtr tree);
! 820:
! 821: /*
! 822: * Saving.
! 823: */
! 824: void xmlDocDumpFormatMemory (xmlDocPtr cur,
! 825: xmlChar **mem,
! 826: int *size,
! 827: int format);
! 828: void xmlDocDumpMemory (xmlDocPtr cur,
! 829: xmlChar **mem,
! 830: int *size);
! 831: void xmlDocDumpMemoryEnc (xmlDocPtr out_doc,
! 832: xmlChar **doc_txt_ptr,
! 833: int * doc_txt_len,
! 834: const char *txt_encoding);
! 835: void xmlDocDumpFormatMemoryEnc(xmlDocPtr out_doc,
! 836: xmlChar **doc_txt_ptr,
! 837: int * doc_txt_len,
! 838: const char *txt_encoding,
! 839: int format);
! 840: int xmlDocFormatDump(FILE *f,
! 841: xmlDocPtr cur,
! 842: int format);
! 843: int xmlDocDump (FILE *f,
! 844: xmlDocPtr cur);
! 845: void xmlElemDump (FILE *f,
! 846: xmlDocPtr doc,
! 847: xmlNodePtr cur);
! 848: int xmlSaveFile (const char *filename,
! 849: xmlDocPtr cur);
! 850: int xmlSaveFormatFile (const char *filename,
! 851: xmlDocPtr cur,
! 852: int format);
! 853: int xmlNodeDump (xmlBufferPtr buf,
! 854: xmlDocPtr doc,
! 855: xmlNodePtr cur,
! 856: int level,
! 857: int format);
! 858:
! 859: int xmlSaveFileTo (xmlOutputBufferPtr buf,
! 860: xmlDocPtr cur,
! 861: const char *encoding);
! 862: int xmlSaveFormatFileTo (xmlOutputBufferPtr buf,
! 863: xmlDocPtr cur,
! 864: const char *encoding,
! 865: int format);
! 866: void xmlNodeDumpOutput (xmlOutputBufferPtr buf,
! 867: xmlDocPtr doc,
! 868: xmlNodePtr cur,
! 869: int level,
! 870: int format,
! 871: const char *encoding);
! 872:
! 873: int xmlSaveFormatFileEnc (const char *filename,
! 874: xmlDocPtr cur,
! 875: const char *encoding,
! 876: int format);
! 877:
! 878: int xmlSaveFileEnc (const char *filename,
! 879: xmlDocPtr cur,
! 880: const char *encoding);
! 881:
! 882: /*
! 883: * XHTML
! 884: */
! 885: int xmlIsXHTML (const xmlChar *systemID,
! 886: const xmlChar *publicID);
! 887:
! 888: /*
! 889: * Compression.
! 890: */
! 891: int xmlGetDocCompressMode (xmlDocPtr doc);
! 892: void xmlSetDocCompressMode (xmlDocPtr doc,
! 893: int mode);
! 894: int xmlGetCompressMode (void);
! 895: void xmlSetCompressMode (int mode);
! 896:
! 897: #ifdef __cplusplus
! 898: }
! 899: #endif
! 900: #ifndef __XML_PARSER_H__
! 901: #include <libxml/xmlmemory.h>
! 902: #endif
! 903:
! 904: #endif /* __XML_TREE_H__ */
! 905:
E-mail: