VirtualBox

source: vbox/trunk/src/libs/libxml2-2.12.6/include/libxml/entities.h@ 105635

最後變更 在這個檔案從105635是 104106,由 vboxsync 提交於 10 月 前

libxml2-2.9.14: Applied and adjusted our libxml2 changes to 2.9.14. bugref:10640

  • 屬性 svn:eol-style 設為 native
檔案大小: 4.5 KB
 
1/*
2 * Summary: interface for the XML entities handling
3 * Description: this module provides some of the entity API needed
4 * for the parser and applications.
5 *
6 * Copy: See Copyright for the status of this software.
7 *
8 * Author: Daniel Veillard
9 */
10
11#ifndef __XML_ENTITIES_H__
12#define __XML_ENTITIES_H__
13
14#include <libxml/xmlversion.h>
15#define XML_TREE_INTERNALS
16#include <libxml/tree.h>
17#undef XML_TREE_INTERNALS
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23/*
24 * The different valid entity types.
25 */
26typedef enum {
27 XML_INTERNAL_GENERAL_ENTITY = 1,
28 XML_EXTERNAL_GENERAL_PARSED_ENTITY = 2,
29 XML_EXTERNAL_GENERAL_UNPARSED_ENTITY = 3,
30 XML_INTERNAL_PARAMETER_ENTITY = 4,
31 XML_EXTERNAL_PARAMETER_ENTITY = 5,
32 XML_INTERNAL_PREDEFINED_ENTITY = 6
33} xmlEntityType;
34
35/*
36 * An unit of storage for an entity, contains the string, the value
37 * and the linkind data needed for the linking in the hash table.
38 */
39
40struct _xmlEntity {
41 void *_private; /* application data */
42 xmlElementType type; /* XML_ENTITY_DECL, must be second ! */
43 const xmlChar *name; /* Entity name */
44 struct _xmlNode *children; /* First child link */
45 struct _xmlNode *last; /* Last child link */
46 struct _xmlDtd *parent; /* -> DTD */
47 struct _xmlNode *next; /* next sibling link */
48 struct _xmlNode *prev; /* previous sibling link */
49 struct _xmlDoc *doc; /* the containing document */
50
51 xmlChar *orig; /* content without ref substitution */
52 xmlChar *content; /* content or ndata if unparsed */
53 int length; /* the content length */
54 xmlEntityType etype; /* The entity type */
55 const xmlChar *ExternalID; /* External identifier for PUBLIC */
56 const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC Entity */
57
58 struct _xmlEntity *nexte; /* unused */
59 const xmlChar *URI; /* the full URI as computed */
60 int owner; /* does the entity own the childrens */
61 int flags; /* various flags */
62 unsigned long expandedSize; /* expanded size */
63};
64
65/*
66 * All entities are stored in an hash table.
67 * There is 2 separate hash tables for global and parameter entities.
68 */
69
70typedef struct _xmlHashTable xmlEntitiesTable;
71typedef xmlEntitiesTable *xmlEntitiesTablePtr;
72
73/*
74 * External functions:
75 */
76
77#ifdef LIBXML_LEGACY_ENABLED
78XML_DEPRECATED
79XMLPUBFUN void
80 xmlInitializePredefinedEntities (void);
81#endif /* LIBXML_LEGACY_ENABLED */
82
83XMLPUBFUN xmlEntityPtr
84 xmlNewEntity (xmlDocPtr doc,
85 const xmlChar *name,
86 int type,
87 const xmlChar *ExternalID,
88 const xmlChar *SystemID,
89 const xmlChar *content);
90XMLPUBFUN void
91 xmlFreeEntity (xmlEntityPtr entity);
92XMLPUBFUN xmlEntityPtr
93 xmlAddDocEntity (xmlDocPtr doc,
94 const xmlChar *name,
95 int type,
96 const xmlChar *ExternalID,
97 const xmlChar *SystemID,
98 const xmlChar *content);
99XMLPUBFUN xmlEntityPtr
100 xmlAddDtdEntity (xmlDocPtr doc,
101 const xmlChar *name,
102 int type,
103 const xmlChar *ExternalID,
104 const xmlChar *SystemID,
105 const xmlChar *content);
106XMLPUBFUN xmlEntityPtr
107 xmlGetPredefinedEntity (const xmlChar *name);
108XMLPUBFUN xmlEntityPtr
109 xmlGetDocEntity (const xmlDoc *doc,
110 const xmlChar *name);
111XMLPUBFUN xmlEntityPtr
112 xmlGetDtdEntity (xmlDocPtr doc,
113 const xmlChar *name);
114XMLPUBFUN xmlEntityPtr
115 xmlGetParameterEntity (xmlDocPtr doc,
116 const xmlChar *name);
117#ifdef LIBXML_LEGACY_ENABLED
118XML_DEPRECATED
119XMLPUBFUN const xmlChar *
120 xmlEncodeEntities (xmlDocPtr doc,
121 const xmlChar *input);
122#endif /* LIBXML_LEGACY_ENABLED */
123XMLPUBFUN xmlChar *
124 xmlEncodeEntitiesReentrant(xmlDocPtr doc,
125 const xmlChar *input);
126XMLPUBFUN xmlChar *
127 xmlEncodeSpecialChars (const xmlDoc *doc,
128 const xmlChar *input);
129XMLPUBFUN xmlEntitiesTablePtr
130 xmlCreateEntitiesTable (void);
131#ifdef LIBXML_TREE_ENABLED
132XMLPUBFUN xmlEntitiesTablePtr
133 xmlCopyEntitiesTable (xmlEntitiesTablePtr table);
134#endif /* LIBXML_TREE_ENABLED */
135XMLPUBFUN void
136 xmlFreeEntitiesTable (xmlEntitiesTablePtr table);
137#ifdef LIBXML_OUTPUT_ENABLED
138XMLPUBFUN void
139 xmlDumpEntitiesTable (xmlBufferPtr buf,
140 xmlEntitiesTablePtr table);
141XMLPUBFUN void
142 xmlDumpEntityDecl (xmlBufferPtr buf,
143 xmlEntityPtr ent);
144#endif /* LIBXML_OUTPUT_ENABLED */
145#ifdef LIBXML_LEGACY_ENABLED
146XMLPUBFUN void
147 xmlCleanupPredefinedEntities(void);
148#endif /* LIBXML_LEGACY_ENABLED */
149
150
151#ifdef __cplusplus
152}
153#endif
154
155# endif /* __XML_ENTITIES_H__ */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette