Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
entities.h152 linesDownload Raw Back to libxml
1/*2 * Summary: interface for the XML entities handling3 * Description: this module provides some of the entity API needed4 *              for the parser and applications.5 *6 * Copy: See Copyright for the status of this software.7 *8 * Author: Daniel Veillard9 */10 11#ifndef __XML_ENTITIES_H__12#define __XML_ENTITIES_H__13 14#include <libxml/xmlversion.h>15#include <libxml/tree.h>16 17#ifdef __cplusplus18extern "C" {19#endif20 21/*22 * The different valid entity types.23 */24typedef enum {25    XML_INTERNAL_GENERAL_ENTITY = 1,26    XML_EXTERNAL_GENERAL_PARSED_ENTITY = 2,27    XML_EXTERNAL_GENERAL_UNPARSED_ENTITY = 3,28    XML_INTERNAL_PARAMETER_ENTITY = 4,29    XML_EXTERNAL_PARAMETER_ENTITY = 5,30    XML_INTERNAL_PREDEFINED_ENTITY = 631} xmlEntityType;32 33/*34 * An unit of storage for an entity, contains the string, the value35 * and the linkind data needed for the linking in the hash table.36 */37 38struct _xmlEntity {39    void           *_private;	        /* application data */40    xmlElementType          type;       /* XML_ENTITY_DECL, must be second ! */41    const xmlChar          *name;	/* Entity name */42    struct _xmlNode    *children;	/* First child link */43    struct _xmlNode        *last;	/* Last child link */44    struct _xmlDtd       *parent;	/* -> DTD */45    struct _xmlNode        *next;	/* next sibling link  */46    struct _xmlNode        *prev;	/* previous sibling link  */47    struct _xmlDoc          *doc;       /* the containing document */48 49    xmlChar                *orig;	/* content without ref substitution */50    xmlChar             *content;	/* content or ndata if unparsed */51    int                   length;	/* the content length */52    xmlEntityType          etype;	/* The entity type */53    const xmlChar    *ExternalID;	/* External identifier for PUBLIC */54    const xmlChar      *SystemID;	/* URI for a SYSTEM or PUBLIC Entity */55 56    struct _xmlEntity     *nexte;	/* unused */57    const xmlChar           *URI;	/* the full URI as computed */58    int                    owner;	/* does the entity own the childrens */59    int                    flags;       /* various flags */60    unsigned long   expandedSize;       /* expanded size */61};62 63/*64 * All entities are stored in an hash table.65 * There is 2 separate hash tables for global and parameter entities.66 */67 68typedef struct _xmlHashTable xmlEntitiesTable;69typedef xmlEntitiesTable *xmlEntitiesTablePtr;70 71/*72 * External functions:73 */74 75#ifdef LIBXML_LEGACY_ENABLED76XML_DEPRECATED77XMLPUBFUN void78		xmlInitializePredefinedEntities	(void);79#endif /* LIBXML_LEGACY_ENABLED */80 81XMLPUBFUN xmlEntityPtr82			xmlNewEntity		(xmlDocPtr doc,83						 const xmlChar *name,84						 int type,85						 const xmlChar *ExternalID,86						 const xmlChar *SystemID,87						 const xmlChar *content);88XMLPUBFUN xmlEntityPtr89			xmlAddDocEntity		(xmlDocPtr doc,90						 const xmlChar *name,91						 int type,92						 const xmlChar *ExternalID,93						 const xmlChar *SystemID,94						 const xmlChar *content);95XMLPUBFUN xmlEntityPtr96			xmlAddDtdEntity		(xmlDocPtr doc,97						 const xmlChar *name,98						 int type,99						 const xmlChar *ExternalID,100						 const xmlChar *SystemID,101						 const xmlChar *content);102XMLPUBFUN xmlEntityPtr103			xmlGetPredefinedEntity	(const xmlChar *name);104XMLPUBFUN xmlEntityPtr105			xmlGetDocEntity		(const xmlDoc *doc,106						 const xmlChar *name);107XMLPUBFUN xmlEntityPtr108			xmlGetDtdEntity		(xmlDocPtr doc,109						 const xmlChar *name);110XMLPUBFUN xmlEntityPtr111			xmlGetParameterEntity	(xmlDocPtr doc,112						 const xmlChar *name);113#ifdef LIBXML_LEGACY_ENABLED114XML_DEPRECATED115XMLPUBFUN const xmlChar *116			xmlEncodeEntities	(xmlDocPtr doc,117						 const xmlChar *input);118#endif /* LIBXML_LEGACY_ENABLED */119XMLPUBFUN xmlChar *120			xmlEncodeEntitiesReentrant(xmlDocPtr doc,121						 const xmlChar *input);122XMLPUBFUN xmlChar *123			xmlEncodeSpecialChars	(const xmlDoc *doc,124						 const xmlChar *input);125XMLPUBFUN xmlEntitiesTablePtr126			xmlCreateEntitiesTable	(void);127#ifdef LIBXML_TREE_ENABLED128XMLPUBFUN xmlEntitiesTablePtr129			xmlCopyEntitiesTable	(xmlEntitiesTablePtr table);130#endif /* LIBXML_TREE_ENABLED */131XMLPUBFUN void132			xmlFreeEntitiesTable	(xmlEntitiesTablePtr table);133#ifdef LIBXML_OUTPUT_ENABLED134XMLPUBFUN void135			xmlDumpEntitiesTable	(xmlBufferPtr buf,136						 xmlEntitiesTablePtr table);137XMLPUBFUN void138			xmlDumpEntityDecl	(xmlBufferPtr buf,139						 xmlEntityPtr ent);140#endif /* LIBXML_OUTPUT_ENABLED */141#ifdef LIBXML_LEGACY_ENABLED142XMLPUBFUN void143			xmlCleanupPredefinedEntities(void);144#endif /* LIBXML_LEGACY_ENABLED */145 146 147#ifdef __cplusplus148}149#endif150 151# endif /* __XML_ENTITIES_H__ */152 
codekingpro/portable-devtools · Team Ai