7 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
10 TITLE="Gnome XML Library Reference Manual"
11 HREF="book1.html"><LINK
13 TITLE="Libxml Library Reference"
14 HREF="libxml-lib.html"><LINK
17 HREF="libxml-tree.html"><LINK
20 HREF="libxml-valid.html"></HEAD
43 >Gnome XML Library Reference Manual</FONT
52 HREF="libxml-tree.html"
57 ><<< Previous Page</B
90 HREF="libxml-lib.html"
106 HREF="libxml-valid.html"
111 >Next Page >>></B
120 NAME="LIBXML-ENTITIES">entities</H1
128 >entities -- </DIV
130 CLASS="REFSYNOPSISDIV"
146 HREF="libxml-entities.html#XMLENTITYTYPE"
150 HREF="libxml-tree.html#XMLENTITY"
154 HREF="libxml-entities.html#XMLENTITIESTABLEPTR"
155 >xmlEntitiesTablePtr</A
158 HREF="libxml-entities.html#XMLINITIALIZEPREDEFINEDENTITIES"
159 >xmlInitializePredefinedEntities</A
162 HREF="libxml-tree.html#XMLENTITYPTR"
165 HREF="libxml-entities.html#XMLADDDOCENTITY"
168 HREF="libxml-tree.html#XMLDOCPTR"
172 HREF="libxml-tree.html#XMLCHAR"
177 HREF="libxml-tree.html#XMLCHAR"
181 HREF="libxml-tree.html#XMLCHAR"
185 HREF="libxml-tree.html#XMLCHAR"
189 HREF="libxml-tree.html#XMLENTITYPTR"
192 HREF="libxml-entities.html#XMLADDDTDENTITY"
195 HREF="libxml-tree.html#XMLDOCPTR"
199 HREF="libxml-tree.html#XMLCHAR"
204 HREF="libxml-tree.html#XMLCHAR"
208 HREF="libxml-tree.html#XMLCHAR"
212 HREF="libxml-tree.html#XMLCHAR"
216 HREF="libxml-tree.html#XMLENTITYPTR"
219 HREF="libxml-entities.html#XMLGETPREDEFINEDENTITY"
220 >xmlGetPredefinedEntity</A
222 HREF="libxml-tree.html#XMLCHAR"
226 HREF="libxml-tree.html#XMLENTITYPTR"
229 HREF="libxml-entities.html#XMLGETDOCENTITY"
232 HREF="libxml-tree.html#XMLDOCPTR"
236 HREF="libxml-tree.html#XMLCHAR"
240 HREF="libxml-tree.html#XMLENTITYPTR"
243 HREF="libxml-entities.html#XMLGETDTDENTITY"
246 HREF="libxml-tree.html#XMLDOCPTR"
250 HREF="libxml-tree.html#XMLCHAR"
254 HREF="libxml-tree.html#XMLENTITYPTR"
257 HREF="libxml-entities.html#XMLGETPARAMETERENTITY"
258 >xmlGetParameterEntity</A
260 HREF="libxml-tree.html#XMLDOCPTR"
264 HREF="libxml-tree.html#XMLCHAR"
268 HREF="libxml-tree.html#XMLCHAR"
271 HREF="libxml-entities.html#XMLENCODEENTITIES"
272 >xmlEncodeEntities</A
274 HREF="libxml-tree.html#XMLDOCPTR"
278 HREF="libxml-tree.html#XMLCHAR"
282 HREF="libxml-tree.html#XMLCHAR"
285 HREF="libxml-entities.html#XMLENCODEENTITIESREENTRANT"
286 >xmlEncodeEntitiesReentrant</A
288 HREF="libxml-tree.html#XMLDOCPTR"
292 HREF="libxml-tree.html#XMLCHAR"
296 HREF="libxml-tree.html#XMLCHAR"
299 HREF="libxml-entities.html#XMLENCODESPECIALCHARS"
300 >xmlEncodeSpecialChars</A
302 HREF="libxml-tree.html#XMLDOCPTR"
306 HREF="libxml-tree.html#XMLCHAR"
310 HREF="libxml-entities.html#XMLENTITIESTABLEPTR"
311 >xmlEntitiesTablePtr</A
313 HREF="libxml-entities.html#XMLCREATEENTITIESTABLE"
314 >xmlCreateEntitiesTable</A
317 HREF="libxml-entities.html#XMLENTITIESTABLEPTR"
318 >xmlEntitiesTablePtr</A
320 HREF="libxml-entities.html#XMLCOPYENTITIESTABLE"
321 >xmlCopyEntitiesTable</A
323 HREF="libxml-entities.html#XMLENTITIESTABLEPTR"
324 >xmlEntitiesTablePtr</A
327 HREF="libxml-entities.html#XMLFREEENTITIESTABLE"
328 >xmlFreeEntitiesTable</A
330 HREF="libxml-entities.html#XMLENTITIESTABLEPTR"
331 >xmlEntitiesTablePtr</A
334 HREF="libxml-entities.html#XMLDUMPENTITIESTABLE"
335 >xmlDumpEntitiesTable</A
337 HREF="libxml-tree.html#XMLBUFFERPTR"
341 HREF="libxml-entities.html#XMLENTITIESTABLEPTR"
342 >xmlEntitiesTablePtr</A
345 HREF="libxml-entities.html#XMLDUMPENTITYDECL"
346 >xmlDumpEntityDecl</A
348 HREF="libxml-tree.html#XMLBUFFERPTR"
352 HREF="libxml-tree.html#XMLENTITYPTR"
356 HREF="libxml-entities.html#XMLCLEANUPPREDEFINEDENTITIES"
357 >xmlCleanupPredefinedEntities</A
389 >enum xmlEntityType</H3
398 CLASS="PROGRAMLISTING"
400 XML_INTERNAL_GENERAL_ENTITY = 1,
401 XML_EXTERNAL_GENERAL_PARSED_ENTITY = 2,
402 XML_EXTERNAL_GENERAL_UNPARSED_ENTITY = 3,
403 XML_INTERNAL_PARAMETER_ENTITY = 4,
404 XML_EXTERNAL_PARAMETER_ENTITY = 5,
405 XML_INTERNAL_PREDEFINED_ENTITY = 6
406 } xmlEntityType;</PRE
422 >struct xmlEntity</H3
431 CLASS="PROGRAMLISTING"
433 void *_private; /* application data */
434 xmlElementType type; /* XML_ENTITY_DECL, must be second ! */
435 const xmlChar *name; /* Entity name */
436 struct _xmlNode *children; /* First child link */
437 struct _xmlNode *last; /* Last child link */
438 struct _xmlDtd *parent; /* -> DTD */
439 struct _xmlNode *next; /* next sibling link */
440 struct _xmlNode *prev; /* previous sibling link */
441 struct _xmlDoc *doc; /* the containing document */
443 xmlChar *orig; /* content without ref substitution */
444 xmlChar *content; /* content or ndata if unparsed */
445 int length; /* the content length */
446 xmlEntityType etype; /* The entity type */
447 const xmlChar *ExternalID; /* External identifier for PUBLIC */
448 const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC Entity */
450 struct _xmlEntity *nexte; /* unused */
451 const xmlChar *URI; /* the full URI as computed */
466 NAME="XMLENTITIESTABLEPTR"
468 >xmlEntitiesTablePtr</H3
477 CLASS="PROGRAMLISTING"
478 >typedef xmlEntitiesTable *xmlEntitiesTablePtr;</PRE
492 NAME="XMLINITIALIZEPREDEFINEDENTITIES"
494 >xmlInitializePredefinedEntities ()</H3
503 CLASS="PROGRAMLISTING"
504 >void xmlInitializePredefinedEntities (void);</PRE
509 >Set up the predefined entities.</P
520 NAME="XMLADDDOCENTITY"
522 >xmlAddDocEntity ()</H3
531 CLASS="PROGRAMLISTING"
533 HREF="libxml-tree.html#XMLENTITYPTR"
535 > xmlAddDocEntity (<A
536 HREF="libxml-tree.html#XMLDOCPTR"
540 HREF="libxml-tree.html#XMLCHAR"
545 HREF="libxml-tree.html#XMLCHAR"
549 HREF="libxml-tree.html#XMLCHAR"
553 HREF="libxml-tree.html#XMLCHAR"
560 >Register a new entity for this document.</P
564 CLASS="INFORMALTABLE"
608 > the entity name</TD
625 > the entity type XML_xxx_yyy_ENTITY</TD
642 > the entity external ID if available</TD
659 > the entity system ID if available</TD
676 > the entity content</TD
694 >a pointer to the entity or NULL in case of error</TD
709 NAME="XMLADDDTDENTITY"
711 >xmlAddDtdEntity ()</H3
720 CLASS="PROGRAMLISTING"
722 HREF="libxml-tree.html#XMLENTITYPTR"
724 > xmlAddDtdEntity (<A
725 HREF="libxml-tree.html#XMLDOCPTR"
729 HREF="libxml-tree.html#XMLCHAR"
734 HREF="libxml-tree.html#XMLCHAR"
738 HREF="libxml-tree.html#XMLCHAR"
742 HREF="libxml-tree.html#XMLCHAR"
749 >Register a new entity for this document DTD external subset.</P
753 CLASS="INFORMALTABLE"
797 > the entity name</TD
814 > the entity type XML_xxx_yyy_ENTITY</TD
831 > the entity external ID if available</TD
848 > the entity system ID if available</TD
865 > the entity content</TD
883 >a pointer to the entity or NULL in case of error</TD
898 NAME="XMLGETPREDEFINEDENTITY"
900 >xmlGetPredefinedEntity ()</H3
909 CLASS="PROGRAMLISTING"
911 HREF="libxml-tree.html#XMLENTITYPTR"
913 > xmlGetPredefinedEntity (const <A
914 HREF="libxml-tree.html#XMLCHAR"
921 >Check whether this name is an predefined entity.</P
925 CLASS="INFORMALTABLE"
952 > the entity name</TD
970 >NULL if not, otherwise the entity</TD
985 NAME="XMLGETDOCENTITY"
987 >xmlGetDocEntity ()</H3
996 CLASS="PROGRAMLISTING"
998 HREF="libxml-tree.html#XMLENTITYPTR"
1000 > xmlGetDocEntity (<A
1001 HREF="libxml-tree.html#XMLDOCPTR"
1005 HREF="libxml-tree.html#XMLCHAR"
1012 >Do an entity lookup in the document entity hash table and
1013 returns the corresponding entity, otherwise a lookup is done
1014 in the predefined entities too.</P
1018 CLASS="INFORMALTABLE"
1045 > the document referencing the entity</TD
1062 > the entity name</TD
1080 >A pointer to the entity structure or NULL if not found.</TD
1095 NAME="XMLGETDTDENTITY"
1097 >xmlGetDtdEntity ()</H3
1106 CLASS="PROGRAMLISTING"
1108 HREF="libxml-tree.html#XMLENTITYPTR"
1110 > xmlGetDtdEntity (<A
1111 HREF="libxml-tree.html#XMLDOCPTR"
1115 HREF="libxml-tree.html#XMLCHAR"
1122 >Do an entity lookup in the DTD entity hash table and
1123 returns the corresponding entity, if found.
1124 Note: the first argument is the document node, not the DTD node.</P
1128 CLASS="INFORMALTABLE"
1155 > the document referencing the entity</TD
1172 > the entity name</TD
1190 >A pointer to the entity structure or NULL if not found.</TD
1205 NAME="XMLGETPARAMETERENTITY"
1207 >xmlGetParameterEntity ()</H3
1216 CLASS="PROGRAMLISTING"
1218 HREF="libxml-tree.html#XMLENTITYPTR"
1220 > xmlGetParameterEntity (<A
1221 HREF="libxml-tree.html#XMLDOCPTR"
1225 HREF="libxml-tree.html#XMLCHAR"
1232 >Do an entity lookup in the internal and external subsets and
1233 returns the corresponding parameter entity, if found.</P
1237 CLASS="INFORMALTABLE"
1264 > the document referencing the entity</TD
1281 > the entity name</TD
1299 >A pointer to the entity structure or NULL if not found.</TD
1314 NAME="XMLENCODEENTITIES"
1316 >xmlEncodeEntities ()</H3
1325 CLASS="PROGRAMLISTING"
1327 HREF="libxml-tree.html#XMLCHAR"
1329 >* xmlEncodeEntities (<A
1330 HREF="libxml-tree.html#XMLDOCPTR"
1334 HREF="libxml-tree.html#XMLCHAR"
1341 >Do a global encoding of a string, replacing the predefined entities
1342 and non ASCII values with their entities and CharRef counterparts.</P
1344 >TODO: remove xmlEncodeEntities, once we are not afraid of breaking binary
1347 >People must migrate their code to xmlEncodeEntitiesReentrant !
1348 This routine will issue a warning when encountered.</P
1352 CLASS="INFORMALTABLE"
1379 > the document containing the string</TD
1396 > A string to convert to XML.</TD
1414 >A newly allocated string with the substitution done.</TD
1429 NAME="XMLENCODEENTITIESREENTRANT"
1431 >xmlEncodeEntitiesReentrant ()</H3
1440 CLASS="PROGRAMLISTING"
1442 HREF="libxml-tree.html#XMLCHAR"
1444 >* xmlEncodeEntitiesReentrant (<A
1445 HREF="libxml-tree.html#XMLDOCPTR"
1449 HREF="libxml-tree.html#XMLCHAR"
1456 >Do a global encoding of a string, replacing the predefined entities
1457 and non ASCII values with their entities and CharRef counterparts.
1458 Contrary to xmlEncodeEntities, this routine is reentrant, and result
1459 must be deallocated.</P
1463 CLASS="INFORMALTABLE"
1490 > the document containing the string</TD
1507 > A string to convert to XML.</TD
1525 >A newly allocated string with the substitution done.</TD
1540 NAME="XMLENCODESPECIALCHARS"
1542 >xmlEncodeSpecialChars ()</H3
1551 CLASS="PROGRAMLISTING"
1553 HREF="libxml-tree.html#XMLCHAR"
1555 >* xmlEncodeSpecialChars (<A
1556 HREF="libxml-tree.html#XMLDOCPTR"
1560 HREF="libxml-tree.html#XMLCHAR"
1567 >Do a global encoding of a string, replacing the predefined entities
1568 this routine is reentrant, and result must be deallocated.</P
1572 CLASS="INFORMALTABLE"
1599 > the document containing the string</TD
1616 > A string to convert to XML.</TD
1634 >A newly allocated string with the substitution done.</TD
1649 NAME="XMLCREATEENTITIESTABLE"
1651 >xmlCreateEntitiesTable ()</H3
1660 CLASS="PROGRAMLISTING"
1662 HREF="libxml-entities.html#XMLENTITIESTABLEPTR"
1663 >xmlEntitiesTablePtr</A
1664 > xmlCreateEntitiesTable (void);</PRE
1669 >create and initialize an empty entities hash table.</P
1673 CLASS="INFORMALTABLE"
1701 >the xmlEntitiesTablePtr just created or NULL in case of error.</TD
1716 NAME="XMLCOPYENTITIESTABLE"
1718 >xmlCopyEntitiesTable ()</H3
1727 CLASS="PROGRAMLISTING"
1729 HREF="libxml-entities.html#XMLENTITIESTABLEPTR"
1730 >xmlEntitiesTablePtr</A
1731 > xmlCopyEntitiesTable (<A
1732 HREF="libxml-entities.html#XMLENTITIESTABLEPTR"
1733 >xmlEntitiesTablePtr</A
1739 >Build a copy of an entity table.</P
1743 CLASS="INFORMALTABLE"
1770 > An entity table</TD
1788 >the new xmlEntitiesTablePtr or NULL in case of error.</TD
1803 NAME="XMLFREEENTITIESTABLE"
1805 >xmlFreeEntitiesTable ()</H3
1814 CLASS="PROGRAMLISTING"
1815 >void xmlFreeEntitiesTable (<A
1816 HREF="libxml-entities.html#XMLENTITIESTABLEPTR"
1817 >xmlEntitiesTablePtr</A
1823 >Deallocate the memory used by an entities hash table.</P
1827 CLASS="INFORMALTABLE"
1854 > An entity table</TD
1869 NAME="XMLDUMPENTITIESTABLE"
1871 >xmlDumpEntitiesTable ()</H3
1880 CLASS="PROGRAMLISTING"
1881 >void xmlDumpEntitiesTable (<A
1882 HREF="libxml-tree.html#XMLBUFFERPTR"
1886 HREF="libxml-entities.html#XMLENTITIESTABLEPTR"
1887 >xmlEntitiesTablePtr</A
1893 >This will dump the content of the entity table as an XML DTD definition</P
1897 CLASS="INFORMALTABLE"
1924 > An XML buffer.</TD
1941 > An entity table</TD
1956 NAME="XMLDUMPENTITYDECL"
1958 >xmlDumpEntityDecl ()</H3
1967 CLASS="PROGRAMLISTING"
1968 >void xmlDumpEntityDecl (<A
1969 HREF="libxml-tree.html#XMLBUFFERPTR"
1973 HREF="libxml-tree.html#XMLENTITYPTR"
1980 >This will dump the content of the entity table as an XML DTD definition</P
1984 CLASS="INFORMALTABLE"
2011 > An XML buffer.</TD
2028 > An entity table</TD
2043 NAME="XMLCLEANUPPREDEFINEDENTITIES"
2045 >xmlCleanupPredefinedEntities ()</H3
2054 CLASS="PROGRAMLISTING"
2055 >void xmlCleanupPredefinedEntities (void);</PRE
2060 >Cleanup up the predefined entities table.</P
2068 CLEAR="all"><BR><TABLE
2080 HREF="libxml-tree.html"
2085 ><<< Previous Page</B
2118 HREF="libxml-lib.html"
2134 HREF="libxml-valid.html"
2139 >Next Page >>></B