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

entities.h

Go to the documentation of this file.
00001 /*
00002  * entities.h : interface for the XML entities handling
00003  *
00004  * See Copyright for the status of this software.
00005  *
00006  * daniel@veillard.com
00007  */
00008 
00009 #ifndef __XML_ENTITIES_H__
00010 #define __XML_ENTITIES_H__
00011 
00012 #include <libxml/xmlversion.h>
00013 #include <libxml/tree.h>
00014 
00015 #ifdef __cplusplus
00016 extern "C" {
00017 #endif
00018 
00019 /*
00020  * The different valid entity types.
00021  */
00022 typedef enum {
00023     XML_INTERNAL_GENERAL_ENTITY = 1,
00024     XML_EXTERNAL_GENERAL_PARSED_ENTITY = 2,
00025     XML_EXTERNAL_GENERAL_UNPARSED_ENTITY = 3,
00026     XML_INTERNAL_PARAMETER_ENTITY = 4,
00027     XML_EXTERNAL_PARAMETER_ENTITY = 5,
00028     XML_INTERNAL_PREDEFINED_ENTITY = 6
00029 } xmlEntityType;
00030 
00031 /*
00032  * An unit of storage for an entity, contains the string, the value
00033  * and the linkind data needed for the linking in the hash table.
00034  */
00035 
00036 struct _xmlEntity {
00037     void           *_private;           /* application data */
00038     xmlElementType          type;       /* XML_ENTITY_DECL, must be second ! */
00039     const xmlChar          *name;       /* Entity name */
00040     struct _xmlNode    *children;       /* First child link */
00041     struct _xmlNode        *last;       /* Last child link */
00042     struct _xmlDtd       *parent;       /* -> DTD */
00043     struct _xmlNode        *next;       /* next sibling link  */
00044     struct _xmlNode        *prev;       /* previous sibling link  */
00045     struct _xmlDoc          *doc;       /* the containing document */
00046 
00047     xmlChar                *orig;       /* content without ref substitution */
00048     xmlChar             *content;       /* content or ndata if unparsed */
00049     int                   length;       /* the content length */
00050     xmlEntityType          etype;       /* The entity type */
00051     const xmlChar    *ExternalID;       /* External identifier for PUBLIC */
00052     const xmlChar      *SystemID;       /* URI for a SYSTEM or PUBLIC Entity */
00053 
00054     struct _xmlEntity     *nexte;       /* unused */
00055     const xmlChar           *URI;       /* the full URI as computed */
00056     int                    owner;       /* does the entity own the childrens */
00057 };
00058 
00059 /*
00060  * All entities are stored in an hash table.
00061  * There is 2 separate hash tables for global and parameter entities.
00062  */
00063 
00064 typedef struct _xmlHashTable xmlEntitiesTable;
00065 typedef xmlEntitiesTable *xmlEntitiesTablePtr;
00066 
00067 /*
00068  * External functions:
00069  */
00070 
00071 XMLPUBFUN void XMLCALL          
00072                 xmlInitializePredefinedEntities (void);
00073 XMLPUBFUN xmlEntityPtr XMLCALL
00074                         xmlAddDocEntity         (xmlDocPtr doc,
00075                                                  const xmlChar *name,
00076                                                  int type,
00077                                                  const xmlChar *ExternalID,
00078                                                  const xmlChar *SystemID,
00079                                                  const xmlChar *content);
00080 XMLPUBFUN xmlEntityPtr XMLCALL          
00081                         xmlAddDtdEntity         (xmlDocPtr doc,
00082                                                  const xmlChar *name,
00083                                                  int type,
00084                                                  const xmlChar *ExternalID,
00085                                                  const xmlChar *SystemID,
00086                                                  const xmlChar *content);
00087 XMLPUBFUN xmlEntityPtr XMLCALL          
00088                         xmlGetPredefinedEntity  (const xmlChar *name);
00089 XMLPUBFUN xmlEntityPtr XMLCALL          
00090                         xmlGetDocEntity         (xmlDocPtr doc,
00091                                                  const xmlChar *name);
00092 XMLPUBFUN xmlEntityPtr XMLCALL          
00093                         xmlGetDtdEntity         (xmlDocPtr doc,
00094                                                  const xmlChar *name);
00095 XMLPUBFUN xmlEntityPtr XMLCALL          
00096                         xmlGetParameterEntity   (xmlDocPtr doc,
00097                                                  const xmlChar *name);
00098 XMLPUBFUN const xmlChar * XMLCALL               
00099                         xmlEncodeEntities       (xmlDocPtr doc,
00100                                                  const xmlChar *input);
00101 XMLPUBFUN xmlChar * XMLCALL             
00102                         xmlEncodeEntitiesReentrant(xmlDocPtr doc,
00103                                                  const xmlChar *input);
00104 XMLPUBFUN xmlChar * XMLCALL             
00105                         xmlEncodeSpecialChars   (xmlDocPtr doc,
00106                                                  const xmlChar *input);
00107 XMLPUBFUN xmlEntitiesTablePtr XMLCALL   
00108                         xmlCreateEntitiesTable  (void);
00109 XMLPUBFUN xmlEntitiesTablePtr XMLCALL   
00110                         xmlCopyEntitiesTable    (xmlEntitiesTablePtr table);
00111 XMLPUBFUN void XMLCALL                  
00112                         xmlFreeEntitiesTable    (xmlEntitiesTablePtr table);
00113 #ifdef LIBXML_OUTPUT_ENABLED
00114 XMLPUBFUN void XMLCALL                  
00115                         xmlDumpEntitiesTable    (xmlBufferPtr buf,
00116                                                  xmlEntitiesTablePtr table);
00117 XMLPUBFUN void XMLCALL                  
00118                         xmlDumpEntityDecl       (xmlBufferPtr buf,
00119                                                  xmlEntityPtr ent);
00120 #endif /* LIBXML_OUTPUT_ENABLED */
00121 XMLPUBFUN void XMLCALL                  
00122                         xmlCleanupPredefinedEntities(void);
00123 
00124 
00125 #ifdef __cplusplus
00126 }
00127 #endif
00128 
00129 # endif /* __XML_ENTITIES_H__ */
00130 

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