00001
00002
00003
00004
00005
00006
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
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
00033
00034
00035
00036 struct _xmlEntity {
00037 void *_private;
00038 xmlElementType type;
00039 const xmlChar *name;
00040 struct _xmlNode *children;
00041 struct _xmlNode *last;
00042 struct _xmlDtd *parent;
00043 struct _xmlNode *next;
00044 struct _xmlNode *prev;
00045 struct _xmlDoc *doc;
00046
00047 xmlChar *orig;
00048 xmlChar *content;
00049 int length;
00050 xmlEntityType etype;
00051 const xmlChar *ExternalID;
00052 const xmlChar *SystemID;
00053
00054 struct _xmlEntity *nexte;
00055 const xmlChar *URI;
00056 int owner;
00057 };
00058
00059
00060
00061
00062
00063
00064 typedef struct _xmlHashTable xmlEntitiesTable;
00065 typedef xmlEntitiesTable *xmlEntitiesTablePtr;
00066
00067
00068
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
00121 XMLPUBFUN void XMLCALL
00122 xmlCleanupPredefinedEntities(void);
00123
00124
00125 #ifdef __cplusplus
00126 }
00127 #endif
00128
00129 # endif
00130