Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

tree.h

Go to the documentation of this file.
00001 /*
00002  * tree.h : describes the structures found in an tree resulting
00003  *          from an XML parsing.
00004  *
00005  * See Copyright for the status of this software.
00006  *
00007  * daniel@veillard.com
00008  *
00009  */
00010 
00011 #ifndef __XML_TREE_H__
00012 #define __XML_TREE_H__
00013 
00014 #include <stdio.h>
00015 #include <libxml/xmlversion.h>
00016 
00017 #ifdef __cplusplus
00018 extern "C" {
00019 #endif
00020 
00021 /*
00022  * Some of the basic types pointer to structures:
00023  */
00024 /* xmlIO.h */
00025 typedef struct _xmlParserInputBuffer xmlParserInputBuffer;
00026 typedef xmlParserInputBuffer *xmlParserInputBufferPtr;
00027 
00028 typedef struct _xmlOutputBuffer xmlOutputBuffer;
00029 typedef xmlOutputBuffer *xmlOutputBufferPtr;
00030 
00031 /* parser.h */
00032 typedef struct _xmlParserInput xmlParserInput;
00033 typedef xmlParserInput *xmlParserInputPtr;
00034 
00035 typedef struct _xmlParserCtxt xmlParserCtxt;
00036 typedef xmlParserCtxt *xmlParserCtxtPtr;
00037 
00038 typedef struct _xmlSAXLocator xmlSAXLocator;
00039 typedef xmlSAXLocator *xmlSAXLocatorPtr;
00040 
00041 typedef struct _xmlSAXHandler xmlSAXHandler;
00042 typedef xmlSAXHandler *xmlSAXHandlerPtr;
00043 
00044 /* entities.h */
00045 typedef struct _xmlEntity xmlEntity;
00046 typedef xmlEntity *xmlEntityPtr;
00047 
00053 #define BASE_BUFFER_SIZE 4096
00054 
00061 #define XML_XML_NAMESPACE \
00062     (const xmlChar *) "http://www.w3.org/XML/1998/namespace"
00063 
00064 /*
00065  * The different element types carried by an XML tree.
00066  *
00067  * NOTE: This is synchronized with DOM Level1 values
00068  *       See http://www.w3.org/TR/REC-DOM-Level-1/
00069  *
00070  * Actually this had diverged a bit, and now XML_DOCUMENT_TYPE_NODE should
00071  * be deprecated to use an XML_DTD_NODE.
00072  */
00073 typedef enum {
00074     XML_ELEMENT_NODE=           1,
00075     XML_ATTRIBUTE_NODE=         2,
00076     XML_TEXT_NODE=              3,
00077     XML_CDATA_SECTION_NODE=     4,
00078     XML_ENTITY_REF_NODE=        5,
00079     XML_ENTITY_NODE=            6,
00080     XML_PI_NODE=                7,
00081     XML_COMMENT_NODE=           8,
00082     XML_DOCUMENT_NODE=          9,
00083     XML_DOCUMENT_TYPE_NODE=     10,
00084     XML_DOCUMENT_FRAG_NODE=     11,
00085     XML_NOTATION_NODE=          12,
00086     XML_HTML_DOCUMENT_NODE=     13,
00087     XML_DTD_NODE=               14,
00088     XML_ELEMENT_DECL=           15,
00089     XML_ATTRIBUTE_DECL=         16,
00090     XML_ENTITY_DECL=            17,
00091     XML_NAMESPACE_DECL=         18,
00092     XML_XINCLUDE_START=         19,
00093     XML_XINCLUDE_END=           20
00094 #ifdef LIBXML_DOCB_ENABLED
00095    ,XML_DOCB_DOCUMENT_NODE=     21
00096 #endif
00097 } xmlElementType;
00098 
00107 typedef unsigned char xmlChar;
00108 
00114 #define BAD_CAST (xmlChar *)
00115 
00122 typedef struct _xmlNotation xmlNotation;
00123 typedef xmlNotation *xmlNotationPtr;
00124 struct _xmlNotation {
00125     const xmlChar               *name;          /* Notation name */
00126     const xmlChar               *PublicID;      /* Public identifier, if any */
00127     const xmlChar               *SystemID;      /* System identifier, if any */
00128 };
00129 
00136 typedef enum {
00137     XML_ATTRIBUTE_CDATA = 1,
00138     XML_ATTRIBUTE_ID,
00139     XML_ATTRIBUTE_IDREF ,
00140     XML_ATTRIBUTE_IDREFS,
00141     XML_ATTRIBUTE_ENTITY,
00142     XML_ATTRIBUTE_ENTITIES,
00143     XML_ATTRIBUTE_NMTOKEN,
00144     XML_ATTRIBUTE_NMTOKENS,
00145     XML_ATTRIBUTE_ENUMERATION,
00146     XML_ATTRIBUTE_NOTATION
00147 } xmlAttributeType;
00148 
00155 typedef enum {
00156     XML_ATTRIBUTE_NONE = 1,
00157     XML_ATTRIBUTE_REQUIRED,
00158     XML_ATTRIBUTE_IMPLIED,
00159     XML_ATTRIBUTE_FIXED
00160 } xmlAttributeDefault;
00161 
00168 typedef struct _xmlEnumeration xmlEnumeration;
00169 typedef xmlEnumeration *xmlEnumerationPtr;
00170 struct _xmlEnumeration {
00171     struct _xmlEnumeration    *next;    /* next one */
00172     const xmlChar            *name;     /* Enumeration name */
00173 };
00174 
00181 typedef struct _xmlAttribute xmlAttribute;
00182 typedef xmlAttribute *xmlAttributePtr;
00183 struct _xmlAttribute {
00184     void           *_private;           /* application data */
00185     xmlElementType          type;       /* XML_ATTRIBUTE_DECL, must be second ! */
00186     const xmlChar          *name;       /* Attribute name */
00187     struct _xmlNode    *children;       /* NULL */
00188     struct _xmlNode        *last;       /* NULL */
00189     struct _xmlDtd       *parent;       /* -> DTD */
00190     struct _xmlNode        *next;       /* next sibling link  */
00191     struct _xmlNode        *prev;       /* previous sibling link  */
00192     struct _xmlDoc          *doc;       /* the containing document */
00193 
00194     struct _xmlAttribute  *nexth;       /* next in hash table */
00195     xmlAttributeType       atype;       /* The attribute type */
00196     xmlAttributeDefault      def;       /* the default */
00197     const xmlChar  *defaultValue;       /* or the default value */
00198     xmlEnumerationPtr       tree;       /* or the enumeration tree if any */
00199     const xmlChar        *prefix;       /* the namespace prefix if any */
00200     const xmlChar          *elem;       /* Element holding the attribute */
00201 };
00202 
00208 typedef enum {
00209     XML_ELEMENT_CONTENT_PCDATA = 1,
00210     XML_ELEMENT_CONTENT_ELEMENT,
00211     XML_ELEMENT_CONTENT_SEQ,
00212     XML_ELEMENT_CONTENT_OR
00213 } xmlElementContentType;
00214 
00220 typedef enum {
00221     XML_ELEMENT_CONTENT_ONCE = 1,
00222     XML_ELEMENT_CONTENT_OPT,
00223     XML_ELEMENT_CONTENT_MULT,
00224     XML_ELEMENT_CONTENT_PLUS
00225 } xmlElementContentOccur;
00226 
00234 typedef struct _xmlElementContent xmlElementContent;
00235 typedef xmlElementContent *xmlElementContentPtr;
00236 struct _xmlElementContent {
00237     xmlElementContentType     type;     /* PCDATA, ELEMENT, SEQ or OR */
00238     xmlElementContentOccur    ocur;     /* ONCE, OPT, MULT or PLUS */
00239     const xmlChar             *name;    /* Element name */
00240     struct _xmlElementContent *c1;      /* first child */
00241     struct _xmlElementContent *c2;      /* second child */
00242     struct _xmlElementContent *parent;  /* parent */
00243     const xmlChar             *prefix;  /* Namespace prefix */
00244 };
00245 
00252 typedef enum {
00253     XML_ELEMENT_TYPE_UNDEFINED = 0,
00254     XML_ELEMENT_TYPE_EMPTY = 1,
00255     XML_ELEMENT_TYPE_ANY,
00256     XML_ELEMENT_TYPE_MIXED,
00257     XML_ELEMENT_TYPE_ELEMENT
00258 } xmlElementTypeVal;
00259 
00260 
00261 #ifdef __cplusplus
00262 }
00263 #endif
00264 #include <libxml/xmlregexp.h>
00265 #ifdef __cplusplus
00266 extern "C" {
00267 #endif
00268 
00275 typedef struct _xmlElement xmlElement;
00276 typedef xmlElement *xmlElementPtr;
00277 struct _xmlElement {
00278     void           *_private;           /* application data */
00279     xmlElementType          type;       /* XML_ELEMENT_DECL, must be second ! */
00280     const xmlChar          *name;       /* Element name */
00281     struct _xmlNode    *children;       /* NULL */
00282     struct _xmlNode        *last;       /* NULL */
00283     struct _xmlDtd       *parent;       /* -> DTD */
00284     struct _xmlNode        *next;       /* next sibling link  */
00285     struct _xmlNode        *prev;       /* previous sibling link  */
00286     struct _xmlDoc          *doc;       /* the containing document */
00287 
00288     xmlElementTypeVal      etype;       /* The type */
00289     xmlElementContentPtr content;       /* the allowed element content */
00290     xmlAttributePtr   attributes;       /* List of the declared attributes */
00291     const xmlChar        *prefix;       /* the namespace prefix if any */
00292 #ifdef LIBXML_REGEXP_ENABLED
00293     xmlRegexpPtr       contModel;       /* the validating regexp */
00294 #else
00295     void              *contModel;
00296 #endif
00297 };
00298 
00299 
00305 #define XML_LOCAL_NAMESPACE XML_NAMESPACE_DECL
00306 typedef xmlElementType xmlNsType;
00307 
00318 typedef struct _xmlNs xmlNs;
00319 typedef xmlNs *xmlNsPtr;
00320 struct _xmlNs {
00321     struct _xmlNs  *next;       /* next Ns link for this node  */
00322     xmlNsType      type;        /* global or local */
00323     const xmlChar *href;        /* URL for the namespace */
00324     const xmlChar *prefix;      /* prefix for the namespace */
00325     void           *_private;   /* application data */
00326 };
00327 
00334 typedef struct _xmlDtd xmlDtd;
00335 typedef xmlDtd *xmlDtdPtr;
00336 struct _xmlDtd {
00337     void           *_private;   /* application data */
00338     xmlElementType  type;       /* XML_DTD_NODE, must be second ! */
00339     const xmlChar *name;        /* Name of the DTD */
00340     struct _xmlNode *children;  /* the value of the property link */
00341     struct _xmlNode *last;      /* last child link */
00342     struct _xmlDoc  *parent;    /* child->parent link */
00343     struct _xmlNode *next;      /* next sibling link  */
00344     struct _xmlNode *prev;      /* previous sibling link  */
00345     struct _xmlDoc  *doc;       /* the containing document */
00346 
00347     /* End of common part */
00348     void          *notations;   /* Hash table for notations if any */
00349     void          *elements;    /* Hash table for elements if any */
00350     void          *attributes;  /* Hash table for attributes if any */
00351     void          *entities;    /* Hash table for entities if any */
00352     const xmlChar *ExternalID;  /* External identifier for PUBLIC DTD */
00353     const xmlChar *SystemID;    /* URI for a SYSTEM or PUBLIC DTD */
00354     void          *pentities;   /* Hash table for param entities if any */
00355 };
00356 
00362 typedef struct _xmlAttr xmlAttr;
00363 typedef xmlAttr *xmlAttrPtr;
00364 struct _xmlAttr {
00365     void           *_private;   /* application data */
00366     xmlElementType   type;      /* XML_ATTRIBUTE_NODE, must be second ! */
00367     const xmlChar   *name;      /* the name of the property */
00368     struct _xmlNode *children;  /* the value of the property */
00369     struct _xmlNode *last;      /* NULL */
00370     struct _xmlNode *parent;    /* child->parent link */
00371     struct _xmlAttr *next;      /* next sibling link  */
00372     struct _xmlAttr *prev;      /* previous sibling link  */
00373     struct _xmlDoc  *doc;       /* the containing document */
00374     xmlNs           *ns;        /* pointer to the associated namespace */
00375     xmlAttributeType atype;     /* the attribute type if validating */
00376     void            *psvi;      /* for type/PSVI informations */
00377 };
00378 
00385 typedef struct _xmlID xmlID;
00386 typedef xmlID *xmlIDPtr;
00387 struct _xmlID {
00388     struct _xmlID    *next;     /* next ID */
00389     const xmlChar    *value;    /* The ID name */
00390     xmlAttrPtr        attr;     /* The attribute holding it */
00391     const xmlChar    *name;     /* The attribute if attr is not available */
00392     int               lineno;   /* The line number if attr is not available */
00393 };
00394 
00401 typedef struct _xmlRef xmlRef;
00402 typedef xmlRef *xmlRefPtr;
00403 struct _xmlRef {
00404     struct _xmlRef    *next;    /* next Ref */
00405     const xmlChar     *value;   /* The Ref name */
00406     xmlAttrPtr        attr;     /* The attribute holding it */
00407     const xmlChar    *name;     /* The attribute if attr is not available */
00408     int               lineno;   /* The line number if attr is not available */
00409 };
00410 
00418 typedef enum {
00419     XML_BUFFER_ALLOC_DOUBLEIT,
00420     XML_BUFFER_ALLOC_EXACT,
00421     XML_BUFFER_ALLOC_IMMUTABLE
00422 } xmlBufferAllocationScheme;
00423 
00429 typedef struct _xmlBuffer xmlBuffer;
00430 typedef xmlBuffer *xmlBufferPtr;
00431 struct _xmlBuffer {
00432     xmlChar *content;           /* The buffer content UTF8 */
00433     unsigned int use;           /* The buffer size used */
00434     unsigned int size;          /* The buffer size */
00435     xmlBufferAllocationScheme alloc; /* The realloc method */
00436 };
00437 
00443 typedef struct _xmlNode xmlNode;
00444 typedef xmlNode *xmlNodePtr;
00445 struct _xmlNode {
00446     void           *_private;   /* application data */
00447     xmlElementType   type;      /* type number, must be second ! */
00448     const xmlChar   *name;      /* the name of the node, or the entity */
00449     struct _xmlNode *children;  /* parent->childs link */
00450     struct _xmlNode *last;      /* last child link */
00451     struct _xmlNode *parent;    /* child->parent link */
00452     struct _xmlNode *next;      /* next sibling link  */
00453     struct _xmlNode *prev;      /* previous sibling link  */
00454     struct _xmlDoc  *doc;       /* the containing document */
00455 
00456     /* End of common part */
00457     xmlNs           *ns;        /* pointer to the associated namespace */
00458     xmlChar         *content;   /* the content */
00459     struct _xmlAttr *properties;/* properties list */
00460     xmlNs           *nsDef;     /* namespace definitions on this node */
00461     void            *psvi;      /* for type/PSVI informations */
00462     unsigned short   line;      /* line number */
00463     unsigned short   extra;     /* extra data for XPath/XSLT */
00464 };
00465 
00471 #define XML_GET_CONTENT(n)                                      \
00472     ((n)->type == XML_ELEMENT_NODE ? NULL : (n)->content)
00473 
00481 #define XML_GET_LINE(n)                                         \
00482     ((n)->type == XML_ELEMENT_NODE ? (int) (n)->content : 0)
00483 
00484 
00490 typedef struct _xmlDoc xmlDoc;
00491 typedef xmlDoc *xmlDocPtr;
00492 struct _xmlDoc {
00493     void           *_private;   /* application data */
00494     xmlElementType  type;       /* XML_DOCUMENT_NODE, must be second ! */
00495     char           *name;       /* name/filename/URI of the document */
00496     struct _xmlNode *children;  /* the document tree */
00497     struct _xmlNode *last;      /* last child link */
00498     struct _xmlNode *parent;    /* child->parent link */
00499     struct _xmlNode *next;      /* next sibling link  */
00500     struct _xmlNode *prev;      /* previous sibling link  */
00501     struct _xmlDoc  *doc;       /* autoreference to itself */
00502 
00503     /* End of common part */
00504     int             compression;/* level of zlib compression */
00505     int             standalone; /* standalone document (no external refs) */
00506     struct _xmlDtd  *intSubset; /* the document internal subset */
00507     struct _xmlDtd  *extSubset; /* the document external subset */
00508     struct _xmlNs   *oldNs;     /* Global namespace, the old way */
00509     const xmlChar  *version;    /* the XML version string */
00510     const xmlChar  *encoding;   /* external initial encoding, if any */
00511     void           *ids;        /* Hash table for ID attributes if any */
00512     void           *refs;       /* Hash table for IDREFs attributes if any */
00513     const xmlChar  *URL;        /* The URI for that document */
00514     int             charset;    /* encoding of the in-memory content
00515                                    actually an xmlCharEncoding */
00516     struct _xmlDict *dict;      /* dict used to allocate names or NULL */
00517     void           *psvi;       /* for type/PSVI informations */
00518 };
00519 
00525 #ifndef xmlChildrenNode
00526 #define xmlChildrenNode children
00527 #endif
00528 
00534 #ifndef xmlRootNode
00535 #define xmlRootNode children
00536 #endif
00537 
00538 /*
00539  * Variables.
00540  */
00541 
00542 /*
00543  * Some helper functions
00544  */
00545 XMLPUBFUN int XMLCALL
00546                 xmlValidateNCName       (const xmlChar *value,
00547                                          int space);
00548 XMLPUBFUN int XMLCALL           
00549                 xmlValidateQName        (const xmlChar *value,
00550                                          int space);
00551 XMLPUBFUN int XMLCALL           
00552                 xmlValidateName         (const xmlChar *value,
00553                                          int space);
00554 XMLPUBFUN int XMLCALL           
00555                 xmlValidateNMToken      (const xmlChar *value,
00556                                          int space);
00557 
00558 XMLPUBFUN xmlChar * XMLCALL     
00559                 xmlBuildQName           (const xmlChar *ncname,
00560                                          const xmlChar *prefix,
00561                                          xmlChar *memory,
00562                                          int len);
00563 XMLPUBFUN xmlChar * XMLCALL     
00564                 xmlSplitQName2          (const xmlChar *name,
00565                                          xmlChar **prefix);
00566 XMLPUBFUN const xmlChar * XMLCALL       
00567                 xmlSplitQName3          (const xmlChar *name,
00568                                          int *len);
00569 
00570 /*
00571  * Handling Buffers.
00572  */
00573 
00574 XMLPUBFUN void XMLCALL          
00575                 xmlSetBufferAllocationScheme(xmlBufferAllocationScheme scheme);
00576 XMLPUBFUN xmlBufferAllocationScheme XMLCALL      
00577                 xmlGetBufferAllocationScheme(void);
00578 
00579 XMLPUBFUN xmlBufferPtr XMLCALL  
00580                 xmlBufferCreate         (void);
00581 XMLPUBFUN xmlBufferPtr XMLCALL  
00582                 xmlBufferCreateSize     (size_t size);
00583 XMLPUBFUN xmlBufferPtr XMLCALL  
00584                 xmlBufferCreateStatic   (void *mem,
00585                                          size_t size);
00586 XMLPUBFUN int XMLCALL           
00587                 xmlBufferResize         (xmlBufferPtr buf,
00588                                          unsigned int size);
00589 XMLPUBFUN void XMLCALL          
00590                 xmlBufferFree           (xmlBufferPtr buf);
00591 XMLPUBFUN int XMLCALL           
00592                 xmlBufferDump           (FILE *file,
00593                                          xmlBufferPtr buf);
00594 XMLPUBFUN void XMLCALL          
00595                 xmlBufferAdd            (xmlBufferPtr buf,
00596                                          const xmlChar *str,
00597                                          int len);
00598 XMLPUBFUN void XMLCALL          
00599                 xmlBufferAddHead        (xmlBufferPtr buf,
00600                                          const xmlChar *str,
00601                                          int len);
00602 XMLPUBFUN void XMLCALL          
00603                 xmlBufferCat            (xmlBufferPtr buf,
00604                                          const xmlChar *str);
00605 XMLPUBFUN void XMLCALL  
00606                 xmlBufferCCat           (xmlBufferPtr buf,
00607                                          const char *str);
00608 XMLPUBFUN int XMLCALL           
00609                 xmlBufferShrink         (xmlBufferPtr buf,
00610                                          unsigned int len);
00611 XMLPUBFUN int XMLCALL           
00612                 xmlBufferGrow           (xmlBufferPtr buf,
00613                                          unsigned int len);
00614 XMLPUBFUN void XMLCALL          
00615                 xmlBufferEmpty          (xmlBufferPtr buf);
00616 XMLPUBFUN const xmlChar* XMLCALL        
00617                 xmlBufferContent        (const xmlBufferPtr buf);
00618 XMLPUBFUN void XMLCALL          
00619                 xmlBufferSetAllocationScheme(xmlBufferPtr buf,
00620                                          xmlBufferAllocationScheme scheme);
00621 XMLPUBFUN int XMLCALL           
00622                 xmlBufferLength         (const xmlBufferPtr buf);
00623 
00624 /*
00625  * Creating/freeing new structures.
00626  */
00627 XMLPUBFUN xmlDtdPtr XMLCALL     
00628                 xmlCreateIntSubset      (xmlDocPtr doc,
00629                                          const xmlChar *name,
00630                                          const xmlChar *ExternalID,
00631                                          const xmlChar *SystemID);
00632 XMLPUBFUN xmlDtdPtr XMLCALL     
00633                 xmlNewDtd               (xmlDocPtr doc,
00634                                          const xmlChar *name,
00635                                          const xmlChar *ExternalID,
00636                                          const xmlChar *SystemID);
00637 XMLPUBFUN xmlDtdPtr XMLCALL     
00638                 xmlGetIntSubset         (xmlDocPtr doc);
00639 XMLPUBFUN void XMLCALL          
00640                 xmlFreeDtd              (xmlDtdPtr cur);
00641 XMLPUBFUN xmlNsPtr XMLCALL      
00642                 xmlNewGlobalNs          (xmlDocPtr doc,
00643                                          const xmlChar *href,
00644                                          const xmlChar *prefix);
00645 XMLPUBFUN xmlNsPtr XMLCALL      
00646                 xmlNewNs                (xmlNodePtr node,
00647                                          const xmlChar *href,
00648                                          const xmlChar *prefix);
00649 XMLPUBFUN void XMLCALL          
00650                 xmlFreeNs               (xmlNsPtr cur);
00651 XMLPUBFUN void XMLCALL          
00652                 xmlFreeNsList           (xmlNsPtr cur);
00653 XMLPUBFUN xmlDocPtr XMLCALL     
00654                 xmlNewDoc               (const xmlChar *version);
00655 XMLPUBFUN void XMLCALL          
00656                 xmlFreeDoc              (xmlDocPtr cur);
00657 XMLPUBFUN xmlAttrPtr XMLCALL    
00658                 xmlNewDocProp           (xmlDocPtr doc,
00659                                          const xmlChar *name,
00660                                          const xmlChar *value);
00661 XMLPUBFUN xmlAttrPtr XMLCALL    
00662                 xmlNewProp              (xmlNodePtr node,
00663                                          const xmlChar *name,
00664                                          const xmlChar *value);
00665 XMLPUBFUN xmlAttrPtr XMLCALL    
00666                 xmlNewNsProp            (xmlNodePtr node,
00667                                          xmlNsPtr ns,
00668                                          const xmlChar *name,
00669                                          const xmlChar *value);
00670 XMLPUBFUN xmlAttrPtr XMLCALL    
00671                 xmlNewNsPropEatName     (xmlNodePtr node,
00672                                          xmlNsPtr ns,
00673                                          xmlChar *name,
00674                                          const xmlChar *value);
00675 XMLPUBFUN void XMLCALL          
00676                 xmlFreePropList         (xmlAttrPtr cur);
00677 XMLPUBFUN void XMLCALL          
00678                 xmlFreeProp             (xmlAttrPtr cur);
00679 XMLPUBFUN xmlAttrPtr XMLCALL    
00680                 xmlCopyProp             (xmlNodePtr target,
00681                                          xmlAttrPtr cur);
00682 XMLPUBFUN xmlAttrPtr XMLCALL    
00683                 xmlCopyPropList         (xmlNodePtr target,
00684                                          xmlAttrPtr cur);
00685 #ifdef LIBXML_TREE_ENABLED
00686 XMLPUBFUN xmlDtdPtr XMLCALL     
00687                 xmlCopyDtd              (xmlDtdPtr dtd);
00688 XMLPUBFUN xmlDocPtr XMLCALL     
00689                 xmlCopyDoc              (xmlDocPtr doc,
00690                                          int recursive);
00691 #endif /* LIBXML_TREE_ENABLED */
00692 
00693 /*
00694  * Creating new nodes.
00695  */
00696 XMLPUBFUN xmlNodePtr XMLCALL    
00697                 xmlNewDocNode           (xmlDocPtr doc,
00698                                          xmlNsPtr ns,
00699                                          const xmlChar *name,
00700                                          const xmlChar *content);
00701 XMLPUBFUN xmlNodePtr XMLCALL    
00702                 xmlNewDocNodeEatName    (xmlDocPtr doc,
00703                                          xmlNsPtr ns,
00704                                          xmlChar *name,
00705                                          const xmlChar *content);
00706 XMLPUBFUN xmlNodePtr XMLCALL    
00707                 xmlNewDocRawNode        (xmlDocPtr doc,
00708                                          xmlNsPtr ns,
00709                                          const xmlChar *name,
00710                                          const xmlChar *content);
00711 XMLPUBFUN xmlNodePtr XMLCALL    
00712                 xmlNewNode              (xmlNsPtr ns,
00713                                          const xmlChar *name);
00714 XMLPUBFUN xmlNodePtr XMLCALL    
00715                 xmlNewNodeEatName       (xmlNsPtr ns,
00716                                          xmlChar *name);
00717 XMLPUBFUN xmlNodePtr XMLCALL    
00718                 xmlNewChild             (xmlNodePtr parent,
00719                                          xmlNsPtr ns,
00720                                          const xmlChar *name,
00721                                          const xmlChar *content);
00722 XMLPUBFUN xmlNodePtr XMLCALL    
00723                 xmlNewTextChild         (xmlNodePtr parent,
00724                                          xmlNsPtr ns,
00725                                          const xmlChar *name,
00726                                          const xmlChar *content);
00727 XMLPUBFUN xmlNodePtr XMLCALL    
00728                 xmlNewDocText           (xmlDocPtr doc,
00729                                          const xmlChar *content);
00730 XMLPUBFUN xmlNodePtr XMLCALL    
00731                 xmlNewText              (const xmlChar *content);
00732 XMLPUBFUN xmlNodePtr XMLCALL    
00733                 xmlNewPI                (const xmlChar *name,
00734                                          const xmlChar *content);
00735 XMLPUBFUN xmlNodePtr XMLCALL    
00736                 xmlNewDocTextLen        (xmlDocPtr doc,
00737                                          const xmlChar *content,
00738                                          int len);
00739 XMLPUBFUN xmlNodePtr XMLCALL    
00740                 xmlNewTextLen           (const xmlChar *content,
00741                                          int len);
00742 XMLPUBFUN xmlNodePtr XMLCALL    
00743                 xmlNewDocComment        (xmlDocPtr doc,
00744                                          const xmlChar *content);
00745 XMLPUBFUN xmlNodePtr XMLCALL    
00746                 xmlNewComment           (const xmlChar *content);
00747 XMLPUBFUN xmlNodePtr XMLCALL    
00748                 xmlNewCDataBlock        (xmlDocPtr doc,
00749                                          const xmlChar *content,
00750                                          int len);
00751 XMLPUBFUN xmlNodePtr XMLCALL    
00752                 xmlNewCharRef           (xmlDocPtr doc,
00753                                          const xmlChar *name);
00754 XMLPUBFUN xmlNodePtr XMLCALL    
00755                 xmlNewReference         (xmlDocPtr doc,
00756                                          const xmlChar *name);
00757 XMLPUBFUN xmlNodePtr XMLCALL    
00758                 xmlCopyNode             (const xmlNodePtr node,
00759                                          int recursive);
00760 XMLPUBFUN xmlNodePtr XMLCALL    
00761                 xmlDocCopyNode          (const xmlNodePtr node,
00762                                          xmlDocPtr doc,
00763                                          int recursive);
00764 XMLPUBFUN xmlNodePtr XMLCALL    
00765                 xmlCopyNodeList         (const xmlNodePtr node);
00766 #ifdef LIBXML_TREE_ENABLED
00767 XMLPUBFUN xmlNodePtr XMLCALL    
00768                 xmlNewDocFragment       (xmlDocPtr doc);
00769 #endif /* LIBXML_TREE_ENABLED */
00770 
00771 /*
00772  * Navigating.
00773  */
00774 XMLPUBFUN long XMLCALL          
00775                 xmlGetLineNo            (xmlNodePtr node);
00776 #ifdef LIBXML_TREE_ENABLED
00777 XMLPUBFUN xmlChar * XMLCALL     
00778                 xmlGetNodePath          (xmlNodePtr node);
00779 #endif /* LIBXML_TREE_ENABLED */
00780 XMLPUBFUN xmlNodePtr XMLCALL    
00781                 xmlDocGetRootElement    (xmlDocPtr doc);
00782 XMLPUBFUN xmlNodePtr XMLCALL    
00783                 xmlGetLastChild         (xmlNodePtr parent);
00784 XMLPUBFUN int XMLCALL           
00785                 xmlNodeIsText           (xmlNodePtr node);
00786 XMLPUBFUN int XMLCALL           
00787                 xmlIsBlankNode          (xmlNodePtr node);
00788 
00789 #ifdef LIBXML_TREE_ENABLED
00790 /*
00791  * Changing the structure.
00792  */
00793 XMLPUBFUN xmlNodePtr XMLCALL    
00794                 xmlDocSetRootElement    (xmlDocPtr doc,
00795                                          xmlNodePtr root);
00796 XMLPUBFUN void XMLCALL          
00797                 xmlNodeSetName          (xmlNodePtr cur,
00798                                          const xmlChar *name);
00799 #endif /* LIBXML_TREE_ENABLED */
00800 XMLPUBFUN xmlNodePtr XMLCALL    
00801                 xmlAddChild             (xmlNodePtr parent,
00802                                          xmlNodePtr cur);
00803 XMLPUBFUN xmlNodePtr XMLCALL    
00804                 xmlAddChildList         (xmlNodePtr parent,
00805                                          xmlNodePtr cur);
00806 #ifdef LIBXML_TREE_ENABLED
00807 XMLPUBFUN xmlNodePtr XMLCALL    
00808                 xmlReplaceNode          (xmlNodePtr old,
00809                                          xmlNodePtr cur);
00810 XMLPUBFUN xmlNodePtr XMLCALL    
00811                 xmlAddPrevSibling       (xmlNodePtr cur,
00812                                          xmlNodePtr elem);
00813 #endif /* LIBXML_TREE_ENABLED */
00814 XMLPUBFUN xmlNodePtr XMLCALL    
00815                 xmlAddSibling           (xmlNodePtr cur,
00816                                          xmlNodePtr elem);
00817 XMLPUBFUN xmlNodePtr XMLCALL    
00818                 xmlAddNextSibling       (xmlNodePtr cur,
00819                                          xmlNodePtr elem);
00820 XMLPUBFUN void XMLCALL          
00821                 xmlUnlinkNode           (xmlNodePtr cur);
00822 XMLPUBFUN xmlNodePtr XMLCALL    
00823                 xmlTextMerge            (xmlNodePtr first,
00824                                          xmlNodePtr second);
00825 XMLPUBFUN int XMLCALL           
00826                 xmlTextConcat           (xmlNodePtr node,
00827                                          const xmlChar *content,
00828                                          int len);
00829 XMLPUBFUN void XMLCALL          
00830                 xmlFreeNodeList         (xmlNodePtr cur);
00831 XMLPUBFUN void XMLCALL          
00832                 xmlFreeNode             (xmlNodePtr cur);
00833 XMLPUBFUN void XMLCALL          
00834                 xmlSetTreeDoc           (xmlNodePtr tree,
00835                                          xmlDocPtr doc);
00836 XMLPUBFUN void XMLCALL          
00837                 xmlSetListDoc           (xmlNodePtr list,
00838                                          xmlDocPtr doc);
00839 /*
00840  * Namespaces.
00841  */
00842 XMLPUBFUN xmlNsPtr XMLCALL      
00843                 xmlSearchNs             (xmlDocPtr doc,
00844                                          xmlNodePtr node,
00845                                          const xmlChar *nameSpace);
00846 XMLPUBFUN xmlNsPtr XMLCALL      
00847                 xmlSearchNsByHref       (xmlDocPtr doc,
00848                                          xmlNodePtr node,
00849                                          const xmlChar *href);
00850 #ifdef LIBXML_TREE_ENABLED
00851 XMLPUBFUN xmlNsPtr * XMLCALL    
00852                 xmlGetNsList            (xmlDocPtr doc,
00853                                          xmlNodePtr node);
00854 #endif /* LIBXML_TREE_ENABLED */
00855 
00856 XMLPUBFUN void XMLCALL          
00857                 xmlSetNs                (xmlNodePtr node,
00858                                          xmlNsPtr ns);
00859 XMLPUBFUN xmlNsPtr XMLCALL      
00860                 xmlCopyNamespace        (xmlNsPtr cur);
00861 XMLPUBFUN xmlNsPtr XMLCALL      
00862                 xmlCopyNamespaceList    (xmlNsPtr cur);
00863 
00864 /*
00865  * Changing the content.
00866  */
00867 #ifdef LIBXML_TREE_ENABLED
00868 XMLPUBFUN xmlAttrPtr XMLCALL    
00869                 xmlSetProp              (xmlNodePtr node,
00870                                          const xmlChar *name,
00871                                          const xmlChar *value);
00872 #endif /* LIBXML_TREE_ENABLED */
00873 XMLPUBFUN xmlChar * XMLCALL     
00874                 xmlGetNoNsProp          (xmlNodePtr node,
00875                                          const xmlChar *name);
00876 XMLPUBFUN xmlChar * XMLCALL     
00877                 xmlGetProp              (xmlNodePtr node,
00878                                          const xmlChar *name);
00879 XMLPUBFUN xmlAttrPtr XMLCALL    
00880                 xmlHasProp              (xmlNodePtr node,
00881                                          const xmlChar *name);
00882 XMLPUBFUN xmlAttrPtr XMLCALL    
00883                 xmlHasNsProp            (xmlNodePtr node,
00884                                          const xmlChar *name,
00885                                          const xmlChar *nameSpace);
00886 #ifdef LIBXML_TREE_ENABLED
00887 XMLPUBFUN xmlAttrPtr XMLCALL    
00888                 xmlSetNsProp            (xmlNodePtr node,
00889                                          xmlNsPtr ns,
00890                                          const xmlChar *name,
00891                                          const xmlChar *value);
00892 #endif /* LIBXML_TREE_ENABLED */
00893 XMLPUBFUN xmlChar * XMLCALL     
00894                 xmlGetNsProp            (xmlNodePtr node,
00895                                          const xmlChar *name,
00896                                          const xmlChar *nameSpace);
00897 XMLPUBFUN xmlNodePtr XMLCALL    
00898                 xmlStringGetNodeList    (xmlDocPtr doc,
00899                                          const xmlChar *value);
00900 XMLPUBFUN xmlNodePtr XMLCALL    
00901                 xmlStringLenGetNodeList (xmlDocPtr doc,
00902                                          const xmlChar *value,
00903                                          int len);
00904 XMLPUBFUN xmlChar * XMLCALL     
00905                 xmlNodeListGetString    (xmlDocPtr doc,
00906                                          xmlNodePtr list,
00907                                          int inLine);
00908 #ifdef LIBXML_TREE_ENABLED
00909 XMLPUBFUN xmlChar * XMLCALL     
00910                 xmlNodeListGetRawString (xmlDocPtr doc,
00911                                          xmlNodePtr list,
00912                                          int inLine);
00913 #endif /* LIBXML_TREE_ENABLED */
00914 XMLPUBFUN void XMLCALL          
00915                 xmlNodeSetContent       (xmlNodePtr cur,
00916                                          const xmlChar *content);
00917 #ifdef LIBXML_TREE_ENABLED
00918 XMLPUBFUN void XMLCALL          
00919                 xmlNodeSetContentLen    (xmlNodePtr cur,
00920                                          const xmlChar *content,
00921                                          int len);
00922 #endif /* LIBXML_TREE_ENABLED */
00923 XMLPUBFUN void XMLCALL          
00924                 xmlNodeAddContent       (xmlNodePtr cur,
00925                                          const xmlChar *content);
00926 XMLPUBFUN void XMLCALL          
00927                 xmlNodeAddContentLen    (xmlNodePtr cur,
00928                                          const xmlChar *content,
00929                                          int len);
00930 XMLPUBFUN xmlChar * XMLCALL     
00931                 xmlNodeGetContent       (xmlNodePtr cur);
00932 XMLPUBFUN int XMLCALL
00933                 xmlNodeBufGetContent    (xmlBufferPtr buffer,
00934                                          xmlNodePtr cur);
00935 XMLPUBFUN xmlChar * XMLCALL     
00936                 xmlNodeGetLang          (xmlNodePtr cur);
00937 XMLPUBFUN int XMLCALL           
00938                 xmlNodeGetSpacePreserve (xmlNodePtr cur);
00939 #ifdef LIBXML_TREE_ENABLED
00940 XMLPUBFUN void XMLCALL          
00941                 xmlNodeSetLang          (xmlNodePtr cur,
00942                                          const xmlChar *lang);
00943 XMLPUBFUN void XMLCALL          
00944                 xmlNodeSetSpacePreserve (xmlNodePtr cur,
00945                                          int val);
00946 #endif /* LIBXML_TREE_ENABLED */
00947 XMLPUBFUN xmlChar * XMLCALL     
00948                 xmlNodeGetBase          (xmlDocPtr doc,
00949                                          xmlNodePtr cur);
00950 #ifdef LIBXML_TREE_ENABLED
00951 XMLPUBFUN void XMLCALL          
00952                 xmlNodeSetBase          (xmlNodePtr cur,
00953                                          const xmlChar *uri);
00954 
00955 /*
00956  * Removing content.
00957  */
00958 XMLPUBFUN int XMLCALL           
00959                 xmlRemoveProp           (xmlAttrPtr cur);
00960 XMLPUBFUN int XMLCALL           
00961                 xmlUnsetProp            (xmlNodePtr node,
00962                                          const xmlChar *name);
00963 XMLPUBFUN int XMLCALL           
00964                 xmlUnsetNsProp          (xmlNodePtr node,
00965                                          xmlNsPtr ns,
00966                                          const xmlChar *name);
00967 #endif /* LIBXML_TREE_ENABLED */
00968 
00969 /*
00970  * Internal, don't use.
00971  */
00972 XMLPUBFUN void XMLCALL          
00973                 xmlBufferWriteCHAR      (xmlBufferPtr buf,
00974                                          const xmlChar *string);
00975 XMLPUBFUN void XMLCALL          
00976                 xmlBufferWriteChar      (xmlBufferPtr buf,
00977                                          const char *string);
00978 XMLPUBFUN void XMLCALL          
00979                 xmlBufferWriteQuotedString(xmlBufferPtr buf,
00980                                          const xmlChar *string);
00981 
00982 /*
00983  * Namespace handling.
00984  */
00985 XMLPUBFUN int XMLCALL           
00986                 xmlReconciliateNs       (xmlDocPtr doc,
00987                                          xmlNodePtr tree);
00988 
00989 #ifdef LIBXML_OUTPUT_ENABLED
00990 /*
00991  * Saving.
00992  */
00993 XMLPUBFUN void XMLCALL          
00994                 xmlDocDumpFormatMemory  (xmlDocPtr cur,
00995                                          xmlChar **mem,
00996                                          int *size,
00997                                          int format);
00998 XMLPUBFUN void XMLCALL          
00999                 xmlDocDumpMemory        (xmlDocPtr cur,
01000                                          xmlChar **mem,
01001                                          int *size);
01002 XMLPUBFUN void XMLCALL          
01003                 xmlDocDumpMemoryEnc     (xmlDocPtr out_doc,
01004                                          xmlChar **doc_txt_ptr,
01005                                          int * doc_txt_len,
01006                                          const char *txt_encoding);
01007 XMLPUBFUN void XMLCALL          
01008                 xmlDocDumpFormatMemoryEnc(xmlDocPtr out_doc,
01009                                          xmlChar **doc_txt_ptr,
01010                                          int * doc_txt_len,
01011                                          const char *txt_encoding,
01012                                          int format);
01013 XMLPUBFUN int XMLCALL           
01014                 xmlDocFormatDump        (FILE *f,
01015                                          xmlDocPtr cur,
01016                                          int format);
01017 XMLPUBFUN int XMLCALL   
01018                 xmlDocDump              (FILE *f,
01019                                          xmlDocPtr cur);
01020 XMLPUBFUN void XMLCALL          
01021                 xmlElemDump             (FILE *f,
01022                                          xmlDocPtr doc,
01023                                          xmlNodePtr cur);
01024 XMLPUBFUN int XMLCALL           
01025                 xmlSaveFile             (const char *filename,
01026                                          xmlDocPtr cur);
01027 XMLPUBFUN int XMLCALL           
01028                 xmlSaveFormatFile       (const char *filename,
01029                                          xmlDocPtr cur,
01030                                          int format);
01031 XMLPUBFUN int XMLCALL           
01032                 xmlNodeDump             (xmlBufferPtr buf,
01033                                          xmlDocPtr doc,
01034                                          xmlNodePtr cur,
01035                                          int level,
01036                                          int format);
01037 
01038 XMLPUBFUN int XMLCALL           
01039                 xmlSaveFileTo           (xmlOutputBufferPtr buf,
01040                                          xmlDocPtr cur,
01041                                          const char *encoding);
01042 XMLPUBFUN int XMLCALL             
01043                 xmlSaveFormatFileTo     (xmlOutputBufferPtr buf,
01044                                          xmlDocPtr cur,
01045                                          const char *encoding,
01046                                          int format);
01047 XMLPUBFUN void XMLCALL          
01048                 xmlNodeDumpOutput       (xmlOutputBufferPtr buf,
01049                                          xmlDocPtr doc,
01050                                          xmlNodePtr cur,
01051                                          int level,
01052                                          int format,
01053                                          const char *encoding);
01054 
01055 XMLPUBFUN int XMLCALL           
01056                 xmlSaveFormatFileEnc    (const char *filename,
01057                                          xmlDocPtr cur,
01058                                          const char *encoding,
01059                                          int format);
01060 
01061 XMLPUBFUN int XMLCALL           
01062                 xmlSaveFileEnc          (const char *filename,
01063                                          xmlDocPtr cur,
01064                                          const char *encoding);
01065 
01066 #endif /* LIBXML_OUTPUT_ENABLED */
01067 /*
01068  * XHTML
01069  */
01070 XMLPUBFUN int XMLCALL           
01071                 xmlIsXHTML              (const xmlChar *systemID,
01072                                          const xmlChar *publicID);
01073 
01074 /*
01075  * Compression.
01076  */
01077 XMLPUBFUN int XMLCALL           
01078                 xmlGetDocCompressMode   (xmlDocPtr doc);
01079 XMLPUBFUN void XMLCALL          
01080                 xmlSetDocCompressMode   (xmlDocPtr doc,
01081                                          int mode);
01082 XMLPUBFUN int XMLCALL           
01083                 xmlGetCompressMode      (void);
01084 XMLPUBFUN void XMLCALL          
01085                 xmlSetCompressMode      (int mode);
01086 
01087 #ifdef __cplusplus
01088 }
01089 #endif
01090 #ifndef __XML_PARSER_H__
01091 #include <libxml/xmlmemory.h>
01092 #endif
01093 
01094 #endif /* __XML_TREE_H__ */
01095 
01096 

Generated on Wed Mar 16 00:10:27 2005 for Dibbler - a portable DHCPv6 by  doxygen 1.3.9.1