Hash :
e549622b
Author :
Date :
2025-04-28T15:11:24
doc: Convert documentation to Doxygen Automated conversion based on a few regexes.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172
/**
* @file
*
* @brief interface for the XML entities handling
*
* this module provides some of the entity API needed
* for the parser and applications.
*
* @copyright See Copyright for the status of this software.
*
* @author Daniel Veillard
*/
#ifndef __XML_ENTITIES_H__
#define __XML_ENTITIES_H__
#include <libxml/xmlversion.h>
#define XML_TREE_INTERNALS
#include <libxml/tree.h>
#undef XML_TREE_INTERNALS
#ifdef __cplusplus
extern "C" {
#endif
/**
* The different valid entity types.
*/
typedef enum {
/** internal general entity */
XML_INTERNAL_GENERAL_ENTITY = 1,
/** external general parsed entity */
XML_EXTERNAL_GENERAL_PARSED_ENTITY = 2,
/** external general unparsed entity */
XML_EXTERNAL_GENERAL_UNPARSED_ENTITY = 3,
/** internal parameter entity */
XML_INTERNAL_PARAMETER_ENTITY = 4,
/** external parameter entity */
XML_EXTERNAL_PARAMETER_ENTITY = 5,
/** internal predefined entity */
XML_INTERNAL_PREDEFINED_ENTITY = 6
} xmlEntityType;
/**
* An entity declaration
*/
struct _xmlEntity {
/** application data */
void *_private;
/** XML_ENTITY_DECL, must be second ! */
xmlElementType type;
/** Entity name */
const xmlChar *name;
/** First child link */
struct _xmlNode *children;
/** Last child link */
struct _xmlNode *last;
/** -> DTD */
struct _xmlDtd *parent;
/** next sibling link */
struct _xmlNode *next;
/** previous sibling link */
struct _xmlNode *prev;
/** the containing document */
struct _xmlDoc *doc;
/** content without ref substitution */
xmlChar *orig;
/** content or ndata if unparsed */
xmlChar *content;
/** the content length */
int length;
/** The entity type */
xmlEntityType etype;
/** External identifier for PUBLIC */
const xmlChar *ExternalID;
/** URI for a SYSTEM or PUBLIC Entity */
const xmlChar *SystemID;
/** unused */
struct _xmlEntity *nexte;
/** the full URI as computed */
const xmlChar *URI;
/** unused */
int owner;
/** various flags */
int flags;
/** expanded size */
unsigned long expandedSize;
};
/*
* All entities are stored in an hash table.
* There is 2 separate hash tables for global and parameter entities.
*/
typedef struct _xmlHashTable xmlEntitiesTable;
typedef xmlEntitiesTable *xmlEntitiesTablePtr;
/*
* External functions:
*/
XMLPUBFUN xmlEntityPtr
xmlNewEntity (xmlDocPtr doc,
const xmlChar *name,
int type,
const xmlChar *ExternalID,
const xmlChar *SystemID,
const xmlChar *content);
XMLPUBFUN void
xmlFreeEntity (xmlEntityPtr entity);
XMLPUBFUN int
xmlAddEntity (xmlDocPtr doc,
int extSubset,
const xmlChar *name,
int type,
const xmlChar *ExternalID,
const xmlChar *SystemID,
const xmlChar *content,
xmlEntityPtr *out);
XMLPUBFUN xmlEntityPtr
xmlAddDocEntity (xmlDocPtr doc,
const xmlChar *name,
int type,
const xmlChar *ExternalID,
const xmlChar *SystemID,
const xmlChar *content);
XMLPUBFUN xmlEntityPtr
xmlAddDtdEntity (xmlDocPtr doc,
const xmlChar *name,
int type,
const xmlChar *ExternalID,
const xmlChar *SystemID,
const xmlChar *content);
XMLPUBFUN xmlEntityPtr
xmlGetPredefinedEntity (const xmlChar *name);
XMLPUBFUN xmlEntityPtr
xmlGetDocEntity (const xmlDoc *doc,
const xmlChar *name);
XMLPUBFUN xmlEntityPtr
xmlGetDtdEntity (xmlDocPtr doc,
const xmlChar *name);
XMLPUBFUN xmlEntityPtr
xmlGetParameterEntity (xmlDocPtr doc,
const xmlChar *name);
XMLPUBFUN xmlChar *
xmlEncodeEntitiesReentrant(xmlDocPtr doc,
const xmlChar *input);
XMLPUBFUN xmlChar *
xmlEncodeSpecialChars (const xmlDoc *doc,
const xmlChar *input);
XMLPUBFUN xmlEntitiesTablePtr
xmlCreateEntitiesTable (void);
XMLPUBFUN xmlEntitiesTablePtr
xmlCopyEntitiesTable (xmlEntitiesTablePtr table);
XMLPUBFUN void
xmlFreeEntitiesTable (xmlEntitiesTablePtr table);
#ifdef LIBXML_OUTPUT_ENABLED
XMLPUBFUN void
xmlDumpEntitiesTable (xmlBufferPtr buf,
xmlEntitiesTablePtr table);
XMLPUBFUN void
xmlDumpEntityDecl (xmlBufferPtr buf,
xmlEntityPtr ent);
#endif /* LIBXML_OUTPUT_ENABLED */
#ifdef __cplusplus
}
#endif
# endif /* __XML_ENTITIES_H__ */