00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef __XML_ENTITIES_H__
00012 #define __XML_ENTITIES_H__
00013
00014 #include <libxml/xmlversion.h>
00015 #include <libxml/tree.h>
00016
00017 #ifdef __cplusplus
00018 extern "C" {
00019 #endif
00020
00021
00022
00023
00024 typedef enum {
00025 XML_INTERNAL_GENERAL_ENTITY = 1,
00026 XML_EXTERNAL_GENERAL_PARSED_ENTITY = 2,
00027 XML_EXTERNAL_GENERAL_UNPARSED_ENTITY = 3,
00028 XML_INTERNAL_PARAMETER_ENTITY = 4,
00029 XML_EXTERNAL_PARAMETER_ENTITY = 5,
00030 XML_INTERNAL_PREDEFINED_ENTITY = 6
00031 } xmlEntityType;
00032
00033
00034
00035
00036
00037
00038 struct _xmlEntity {
00039 void *_private;
00040 xmlElementType type;
00041 const xmlChar *name;
00042 struct _xmlNode *children;
00043 struct _xmlNode *last;
00044 struct _xmlDtd *parent;
00045 struct _xmlNode *next;
00046 struct _xmlNode *prev;
00047 struct _xmlDoc *doc;
00048
00049 xmlChar *orig;
00050 xmlChar *content;
00051 int length;
00052 xmlEntityType etype;
00053 const xmlChar *ExternalID;
00054 const xmlChar *SystemID;
00055
00056 struct _xmlEntity *nexte;
00057 const xmlChar *URI;
00058 int owner;
00059 int checked;
00060 };
00061
00062
00063
00064
00065
00066
00067 typedef struct _xmlHashTable xmlEntitiesTable;
00068 typedef xmlEntitiesTable *xmlEntitiesTablePtr;
00069
00070
00071
00072
00073
00074 #ifdef LIBXML_LEGACY_ENABLED
00075 XMLPUBFUN void XMLCALL
00076 xmlInitializePredefinedEntities (void);
00077 #endif
00078 XMLPUBFUN xmlEntityPtr XMLCALL
00079 xmlAddDocEntity (xmlDocPtr doc,
00080 const xmlChar *name,
00081 int type,
00082 const xmlChar *ExternalID,
00083 const xmlChar *SystemID,
00084 const xmlChar *content);
00085 XMLPUBFUN xmlEntityPtr XMLCALL
00086 xmlAddDtdEntity (xmlDocPtr doc,
00087 const xmlChar *name,
00088 int type,
00089 const xmlChar *ExternalID,
00090 const xmlChar *SystemID,
00091 const xmlChar *content);
00092 XMLPUBFUN xmlEntityPtr XMLCALL
00093 xmlGetPredefinedEntity (const xmlChar *name);
00094 XMLPUBFUN xmlEntityPtr XMLCALL
00095 xmlGetDocEntity (xmlDocPtr doc,
00096 const xmlChar *name);
00097 XMLPUBFUN xmlEntityPtr XMLCALL
00098 xmlGetDtdEntity (xmlDocPtr doc,
00099 const xmlChar *name);
00100 XMLPUBFUN xmlEntityPtr XMLCALL
00101 xmlGetParameterEntity (xmlDocPtr doc,
00102 const xmlChar *name);
00103 #ifdef LIBXML_LEGACY_ENABLED
00104 XMLPUBFUN const xmlChar * XMLCALL
00105 xmlEncodeEntities (xmlDocPtr doc,
00106 const xmlChar *input);
00107 #endif
00108 XMLPUBFUN xmlChar * XMLCALL
00109 xmlEncodeEntitiesReentrant(xmlDocPtr doc,
00110 const xmlChar *input);
00111 XMLPUBFUN xmlChar * XMLCALL
00112 xmlEncodeSpecialChars (xmlDocPtr doc,
00113 const xmlChar *input);
00114 XMLPUBFUN xmlEntitiesTablePtr XMLCALL
00115 xmlCreateEntitiesTable (void);
00116 #ifdef LIBXML_TREE_ENABLED
00117 XMLPUBFUN xmlEntitiesTablePtr XMLCALL
00118 xmlCopyEntitiesTable (xmlEntitiesTablePtr table);
00119 #endif
00120 XMLPUBFUN void XMLCALL
00121 xmlFreeEntitiesTable (xmlEntitiesTablePtr table);
00122 #ifdef LIBXML_OUTPUT_ENABLED
00123 XMLPUBFUN void XMLCALL
00124 xmlDumpEntitiesTable (xmlBufferPtr buf,
00125 xmlEntitiesTablePtr table);
00126 XMLPUBFUN void XMLCALL
00127 xmlDumpEntityDecl (xmlBufferPtr buf,
00128 xmlEntityPtr ent);
00129 #endif
00130 #ifdef LIBXML_LEGACY_ENABLED
00131 XMLPUBFUN void XMLCALL
00132 xmlCleanupPredefinedEntities(void);
00133 #endif
00134
00135
00136 #ifdef __cplusplus
00137 }
00138 #endif
00139
00140 # endif