File indexing completed on 2025-02-22 10:41:48
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef __XML_ENTITIES_H__
0012 #define __XML_ENTITIES_H__
0013
0014
0015 #include <libxml/xmlversion.h>
0016 #define XML_TREE_INTERNALS
0017 #include <libxml/tree.h>
0018 #undef XML_TREE_INTERNALS
0019
0020
0021 #ifdef __cplusplus
0022 extern "C" {
0023 #endif
0024
0025
0026
0027
0028 typedef enum {
0029 XML_INTERNAL_GENERAL_ENTITY = 1,
0030 XML_EXTERNAL_GENERAL_PARSED_ENTITY = 2,
0031 XML_EXTERNAL_GENERAL_UNPARSED_ENTITY = 3,
0032 XML_INTERNAL_PARAMETER_ENTITY = 4,
0033 XML_EXTERNAL_PARAMETER_ENTITY = 5,
0034 XML_INTERNAL_PREDEFINED_ENTITY = 6
0035 } xmlEntityType;
0036
0037
0038
0039
0040
0041
0042 struct _xmlEntity {
0043 void *_private;
0044 xmlElementType type;
0045 const xmlChar *name;
0046 struct _xmlNode *children;
0047 struct _xmlNode *last;
0048 struct _xmlDtd *parent;
0049 struct _xmlNode *next;
0050 struct _xmlNode *prev;
0051 struct _xmlDoc *doc;
0052
0053 xmlChar *orig;
0054 xmlChar *content;
0055 int length;
0056 xmlEntityType etype;
0057 const xmlChar *ExternalID;
0058 const xmlChar *SystemID;
0059
0060 struct _xmlEntity *nexte;
0061 const xmlChar *URI;
0062 int owner;
0063 int flags;
0064 unsigned long expandedSize;
0065 };
0066
0067
0068
0069
0070
0071
0072 typedef struct _xmlHashTable xmlEntitiesTable;
0073 typedef xmlEntitiesTable *xmlEntitiesTablePtr;
0074
0075
0076
0077
0078
0079 #ifdef LIBXML_LEGACY_ENABLED
0080 XML_DEPRECATED
0081 XMLPUBFUN void
0082 xmlInitializePredefinedEntities (void);
0083 #endif
0084
0085 XMLPUBFUN xmlEntityPtr
0086 xmlNewEntity (xmlDocPtr doc,
0087 const xmlChar *name,
0088 int type,
0089 const xmlChar *ExternalID,
0090 const xmlChar *SystemID,
0091 const xmlChar *content);
0092 XMLPUBFUN void
0093 xmlFreeEntity (xmlEntityPtr entity);
0094 XMLPUBFUN int
0095 xmlAddEntity (xmlDocPtr doc,
0096 int extSubset,
0097 const xmlChar *name,
0098 int type,
0099 const xmlChar *ExternalID,
0100 const xmlChar *SystemID,
0101 const xmlChar *content,
0102 xmlEntityPtr *out);
0103 XMLPUBFUN xmlEntityPtr
0104 xmlAddDocEntity (xmlDocPtr doc,
0105 const xmlChar *name,
0106 int type,
0107 const xmlChar *ExternalID,
0108 const xmlChar *SystemID,
0109 const xmlChar *content);
0110 XMLPUBFUN xmlEntityPtr
0111 xmlAddDtdEntity (xmlDocPtr doc,
0112 const xmlChar *name,
0113 int type,
0114 const xmlChar *ExternalID,
0115 const xmlChar *SystemID,
0116 const xmlChar *content);
0117 XMLPUBFUN xmlEntityPtr
0118 xmlGetPredefinedEntity (const xmlChar *name);
0119 XMLPUBFUN xmlEntityPtr
0120 xmlGetDocEntity (const xmlDoc *doc,
0121 const xmlChar *name);
0122 XMLPUBFUN xmlEntityPtr
0123 xmlGetDtdEntity (xmlDocPtr doc,
0124 const xmlChar *name);
0125 XMLPUBFUN xmlEntityPtr
0126 xmlGetParameterEntity (xmlDocPtr doc,
0127 const xmlChar *name);
0128 #ifdef LIBXML_LEGACY_ENABLED
0129 XML_DEPRECATED
0130 XMLPUBFUN const xmlChar *
0131 xmlEncodeEntities (xmlDocPtr doc,
0132 const xmlChar *input);
0133 #endif
0134 XMLPUBFUN xmlChar *
0135 xmlEncodeEntitiesReentrant(xmlDocPtr doc,
0136 const xmlChar *input);
0137 XMLPUBFUN xmlChar *
0138 xmlEncodeSpecialChars (const xmlDoc *doc,
0139 const xmlChar *input);
0140 XMLPUBFUN xmlEntitiesTablePtr
0141 xmlCreateEntitiesTable (void);
0142 #ifdef LIBXML_TREE_ENABLED
0143 XMLPUBFUN xmlEntitiesTablePtr
0144 xmlCopyEntitiesTable (xmlEntitiesTablePtr table);
0145 #endif
0146 XMLPUBFUN void
0147 xmlFreeEntitiesTable (xmlEntitiesTablePtr table);
0148 #ifdef LIBXML_OUTPUT_ENABLED
0149 XMLPUBFUN void
0150 xmlDumpEntitiesTable (xmlBufferPtr buf,
0151 xmlEntitiesTablePtr table);
0152 XMLPUBFUN void
0153 xmlDumpEntityDecl (xmlBufferPtr buf,
0154 xmlEntityPtr ent);
0155 #endif
0156 #ifdef LIBXML_LEGACY_ENABLED
0157 XMLPUBFUN void
0158 xmlCleanupPredefinedEntities(void);
0159 #endif
0160
0161
0162 #ifdef __cplusplus
0163 }
0164 #endif
0165
0166 # endif