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