mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-21 14:53:44 +03:00
This is the 2.0.0-beta, lots and lots and lots of changes
Have a look at http://xmlsoft.org/upgrade.html Daniel
This commit is contained in:
@@ -15,12 +15,17 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define XML_INTERNAL_GENERAL_ENTITY 1
|
||||
#define XML_EXTERNAL_GENERAL_PARSED_ENTITY 2
|
||||
#define XML_EXTERNAL_GENERAL_UNPARSED_ENTITY 3
|
||||
#define XML_INTERNAL_PARAMETER_ENTITY 4
|
||||
#define XML_EXTERNAL_PARAMETER_ENTITY 5
|
||||
#define XML_INTERNAL_PREDEFINED_ENTITY 6
|
||||
/*
|
||||
* The different valid entity types
|
||||
*/
|
||||
typedef enum {
|
||||
XML_INTERNAL_GENERAL_ENTITY = 1,
|
||||
XML_EXTERNAL_GENERAL_PARSED_ENTITY = 2,
|
||||
XML_EXTERNAL_GENERAL_UNPARSED_ENTITY = 3,
|
||||
XML_INTERNAL_PARAMETER_ENTITY = 4,
|
||||
XML_EXTERNAL_PARAMETER_ENTITY = 5,
|
||||
XML_INTERNAL_PREDEFINED_ENTITY = 6
|
||||
} xmlEntityType;
|
||||
|
||||
/*
|
||||
* An unit of storage for an entity, contains the string, the value
|
||||
@@ -30,14 +35,32 @@ extern "C" {
|
||||
typedef struct _xmlEntity xmlEntity;
|
||||
typedef xmlEntity *xmlEntityPtr;
|
||||
struct _xmlEntity {
|
||||
int type; /* The entity type */
|
||||
int len; /* The lenght of the name */
|
||||
const xmlChar *name; /* Name of the entity */
|
||||
const xmlChar *ExternalID; /* External identifier for PUBLIC Entity */
|
||||
const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC Entity */
|
||||
xmlChar *content; /* The entity content or ndata if unparsed */
|
||||
int length; /* the content length */
|
||||
xmlChar *orig; /* The entity cont without ref substitution */
|
||||
#ifndef XML_WITHOUT_CORBA
|
||||
void *_private; /* for Corba, must be first ! */
|
||||
#endif
|
||||
xmlElementType type; /* XML_ENTITY_DECL, must be second ! */
|
||||
const xmlChar *name; /* Attribute name */
|
||||
struct _xmlNode *children; /* NULL */
|
||||
struct _xmlNode *last; /* NULL */
|
||||
struct _xmlDtd *parent; /* -> DTD */
|
||||
struct _xmlNode *next; /* next sibling link */
|
||||
struct _xmlNode *prev; /* previous sibling link */
|
||||
struct _xmlDoc *doc; /* the containing document */
|
||||
|
||||
xmlChar *orig; /* content without ref substitution */
|
||||
xmlChar *content; /* content or ndata if unparsed */
|
||||
int length; /* the content length */
|
||||
xmlEntityType etype; /* The entity type */
|
||||
const xmlChar *ExternalID; /* External identifier for PUBLIC */
|
||||
const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC Entity */
|
||||
|
||||
#ifdef WITH_EXTRA_ENT_DETECT
|
||||
/* Referenced entities name stack */
|
||||
xmlChar *ent; /* Current parsed Node */
|
||||
int entNr; /* Depth of the parsing stack */
|
||||
int entMax; /* Max depth of the parsing stack */
|
||||
xmlChar * *entTab; /* array of nodes */
|
||||
#endif
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -52,7 +75,7 @@ typedef xmlEntitiesTable *xmlEntitiesTablePtr;
|
||||
struct _xmlEntitiesTable {
|
||||
int nb_entities; /* number of elements stored */
|
||||
int max_entities; /* maximum number of elements */
|
||||
xmlEntityPtr table; /* the table of entities */
|
||||
xmlEntityPtr *table; /* the table of entities */
|
||||
};
|
||||
|
||||
|
||||
@@ -60,13 +83,13 @@ struct _xmlEntitiesTable {
|
||||
* External functions :
|
||||
*/
|
||||
|
||||
void xmlAddDocEntity (xmlDocPtr doc,
|
||||
xmlEntityPtr xmlAddDocEntity (xmlDocPtr doc,
|
||||
const xmlChar *name,
|
||||
int type,
|
||||
const xmlChar *ExternalID,
|
||||
const xmlChar *SystemID,
|
||||
const xmlChar *content);
|
||||
void xmlAddDtdEntity (xmlDocPtr doc,
|
||||
xmlEntityPtr xmlAddDtdEntity (xmlDocPtr doc,
|
||||
const xmlChar *name,
|
||||
int type,
|
||||
const xmlChar *ExternalID,
|
||||
@@ -88,9 +111,16 @@ xmlEntitiesTablePtr xmlCopyEntitiesTable (xmlEntitiesTablePtr table);
|
||||
void xmlFreeEntitiesTable (xmlEntitiesTablePtr table);
|
||||
void xmlDumpEntitiesTable (xmlBufferPtr buf,
|
||||
xmlEntitiesTablePtr table);
|
||||
void xmlDumpEntityDecl (xmlBufferPtr buf,
|
||||
xmlEntityPtr ent);
|
||||
xmlEntitiesTablePtr xmlCopyEntitiesTable (xmlEntitiesTablePtr table);
|
||||
void xmlCleanupPredefinedEntities(void);
|
||||
|
||||
#ifdef WITH_EXTRA_ENT_DETECT
|
||||
int xmlEntityAddReference (xmlEntityPtr ent,
|
||||
const xmlChar *to);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user