| Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame^] | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| 2 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>entities</title><meta name="generator" content="DocBook XSL Stylesheets V1.58.1"><style xmlns="http://www.w3.org/TR/xhtml1/transitional" type="text/css"> |
| 3 | .synopsis, .classsynopsis { |
| 4 | background: #eeeeee; |
| 5 | border: solid 1px #aaaaaa; |
| 6 | padding: 0.5em; |
| 7 | } |
| 8 | .programlisting { |
| 9 | background: #eeeeff; |
| 10 | border: solid 1px #aaaaff; |
| 11 | padding: 0.5em; |
| 12 | } |
| 13 | .variablelist { |
| 14 | padding: 4px; |
| 15 | margin-left: 3em; |
| 16 | } |
| 17 | .navigation { |
| 18 | background: #ffeeee; |
| 19 | border: solid 1px #ffaaaa; |
| 20 | margin-top: 0.5em; |
| 21 | margin-bottom: 0.5em; |
| 22 | } |
| 23 | .navigation a { |
| 24 | color: #770000; |
| 25 | } |
| 26 | .navigation a:visited { |
| 27 | color: #550000; |
| 28 | } |
| 29 | .navigation .title { |
| 30 | font-size: 200%; |
| 31 | } |
| 32 | </style><link rel="home" href="index.html" title="Gnome XML Library Reference Manual"><link rel="up" href="libxml-lib.html" title="Libxml Library Reference"><link rel="previous" href="libxml-tree.html" title="tree"><link rel="next" href="libxml-valid.html" title="valid"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-tree.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></img></a></td><td><a accesskey="u" href="libxml-lib.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></img></a></td><td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></img></a></td><th width="100%" align="center">Gnome XML Library Reference Manual</th><td><a accesskey="n" href="libxml-valid.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></img></a></td></tr></table><div class="refentry" lang="en"><a name="libxml-entities"></a><div class="titlepage"></div><div class="refnamediv"><h2>entities</h2><p>entities — </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis"> |
| Daniel Veillard | 3592547 | 1999-02-25 08:46:07 +0000 | [diff] [blame] | 33 | |
| Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame^] | 34 | |
| 35 | |
| 36 | enum <a href="libxml-entities.html#xmlEntityType">xmlEntityType</a>; |
| 37 | struct <a href="libxml-tree.html#xmlEntity">xmlEntity</a>; |
| 38 | typedef <a href="libxml-entities.html#xmlEntitiesTablePtr">xmlEntitiesTablePtr</a>; |
| 39 | void <a href="libxml-entities.html#xmlInitializePredefinedEntities">xmlInitializePredefinedEntities</a> (void); |
| 40 | <a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> <a href="libxml-entities.html#xmlAddDocEntity">xmlAddDocEntity</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, |
| 41 | const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name, |
| Daniel Veillard | 3592547 | 1999-02-25 08:46:07 +0000 | [diff] [blame] | 42 | int type, |
| Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame^] | 43 | const <a href="libxml-tree.html#xmlChar">xmlChar</a> *ExternalID, |
| 44 | const <a href="libxml-tree.html#xmlChar">xmlChar</a> *SystemID, |
| 45 | const <a href="libxml-tree.html#xmlChar">xmlChar</a> *content); |
| 46 | <a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> <a href="libxml-entities.html#xmlAddDtdEntity">xmlAddDtdEntity</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, |
| 47 | const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name, |
| Daniel Veillard | 3592547 | 1999-02-25 08:46:07 +0000 | [diff] [blame] | 48 | int type, |
| Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame^] | 49 | const <a href="libxml-tree.html#xmlChar">xmlChar</a> *ExternalID, |
| 50 | const <a href="libxml-tree.html#xmlChar">xmlChar</a> *SystemID, |
| 51 | const <a href="libxml-tree.html#xmlChar">xmlChar</a> *content); |
| 52 | <a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> <a href="libxml-entities.html#xmlGetPredefinedEntity">xmlGetPredefinedEntity</a> (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name); |
| 53 | <a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> <a href="libxml-entities.html#xmlGetDocEntity">xmlGetDocEntity</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, |
| 54 | const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name); |
| 55 | <a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> <a href="libxml-entities.html#xmlGetDtdEntity">xmlGetDtdEntity</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, |
| 56 | const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name); |
| 57 | <a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> <a href="libxml-entities.html#xmlGetParameterEntity">xmlGetParameterEntity</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, |
| 58 | const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name); |
| 59 | const <a href="libxml-tree.html#xmlChar">xmlChar</a>* <a href="libxml-entities.html#xmlEncodeEntities">xmlEncodeEntities</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, |
| 60 | const <a href="libxml-tree.html#xmlChar">xmlChar</a> *input); |
| 61 | <a href="libxml-tree.html#xmlChar">xmlChar</a>* <a href="libxml-entities.html#xmlEncodeEntitiesReentrant">xmlEncodeEntitiesReentrant</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, |
| 62 | const <a href="libxml-tree.html#xmlChar">xmlChar</a> *input); |
| 63 | <a href="libxml-tree.html#xmlChar">xmlChar</a>* <a href="libxml-entities.html#xmlEncodeSpecialChars">xmlEncodeSpecialChars</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, |
| 64 | const <a href="libxml-tree.html#xmlChar">xmlChar</a> *input); |
| 65 | <a href="libxml-entities.html#xmlEntitiesTablePtr">xmlEntitiesTablePtr</a> <a href="libxml-entities.html#xmlCreateEntitiesTable">xmlCreateEntitiesTable</a> (void); |
| 66 | <a href="libxml-entities.html#xmlEntitiesTablePtr">xmlEntitiesTablePtr</a> <a href="libxml-entities.html#xmlCopyEntitiesTable">xmlCopyEntitiesTable</a> (<a href="libxml-entities.html#xmlEntitiesTablePtr">xmlEntitiesTablePtr</a> table); |
| 67 | void <a href="libxml-entities.html#xmlFreeEntitiesTable">xmlFreeEntitiesTable</a> (<a href="libxml-entities.html#xmlEntitiesTablePtr">xmlEntitiesTablePtr</a> table); |
| 68 | void <a href="libxml-entities.html#xmlDumpEntitiesTable">xmlDumpEntitiesTable</a> (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, |
| 69 | <a href="libxml-entities.html#xmlEntitiesTablePtr">xmlEntitiesTablePtr</a> table); |
| 70 | void <a href="libxml-entities.html#xmlDumpEntityDecl">xmlDumpEntityDecl</a> (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, |
| 71 | <a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> ent); |
| 72 | void <a href="libxml-entities.html#xmlCleanupPredefinedEntities">xmlCleanupPredefinedEntities</a> (void); |
| 73 | </pre></div><div class="refsect1" lang="en"><h2>Description</h2><p> |
| 74 | |
| 75 | </p></div><div class="refsect1" lang="en"><h2>Details</h2><div class="refsect2" lang="en"><h3><a name="xmlEntityType"></a>enum xmlEntityType</h3><pre class="programlisting">typedef enum { |
| Daniel Veillard | 3f6f7f6 | 2000-06-30 17:58:25 +0000 | [diff] [blame] | 76 | XML_INTERNAL_GENERAL_ENTITY = 1, |
| 77 | XML_EXTERNAL_GENERAL_PARSED_ENTITY = 2, |
| 78 | XML_EXTERNAL_GENERAL_UNPARSED_ENTITY = 3, |
| 79 | XML_INTERNAL_PARAMETER_ENTITY = 4, |
| 80 | XML_EXTERNAL_PARAMETER_ENTITY = 5, |
| 81 | XML_INTERNAL_PREDEFINED_ENTITY = 6 |
| Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame^] | 82 | } xmlEntityType; |
| 83 | </pre><p> |
| 84 | |
| 85 | </p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlEntity"></a>struct xmlEntity</h3><pre class="programlisting">struct xmlEntity { |
| Daniel Veillard | cbaf399 | 2001-12-31 16:16:02 +0000 | [diff] [blame] | 86 | void *_private; /* application data */ |
| Daniel Veillard | 3f6f7f6 | 2000-06-30 17:58:25 +0000 | [diff] [blame] | 87 | xmlElementType type; /* XML_ENTITY_DECL, must be second ! */ |
| Daniel Veillard | 5f4b599 | 2002-02-20 10:22:49 +0000 | [diff] [blame] | 88 | const xmlChar *name; /* Entity name */ |
| 89 | struct _xmlNode *children; /* First child link */ |
| 90 | struct _xmlNode *last; /* Last child link */ |
| Daniel Veillard | 3bbbe6f | 2001-05-03 11:15:37 +0000 | [diff] [blame] | 91 | struct _xmlDtd *parent; /* -> DTD */ |
| Daniel Veillard | 3f6f7f6 | 2000-06-30 17:58:25 +0000 | [diff] [blame] | 92 | struct _xmlNode *next; /* next sibling link */ |
| 93 | struct _xmlNode *prev; /* previous sibling link */ |
| 94 | struct _xmlDoc *doc; /* the containing document */ |
| 95 | |
| 96 | xmlChar *orig; /* content without ref substitution */ |
| 97 | xmlChar *content; /* content or ndata if unparsed */ |
| 98 | int length; /* the content length */ |
| 99 | xmlEntityType etype; /* The entity type */ |
| 100 | const xmlChar *ExternalID; /* External identifier for PUBLIC */ |
| 101 | const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC Entity */ |
| 102 | |
| Daniel Veillard | 29a11cc | 2000-10-25 13:32:39 +0000 | [diff] [blame] | 103 | struct _xmlEntity *nexte; /* unused */ |
| Daniel Veillard | 3bff2b0 | 2000-10-01 20:33:47 +0000 | [diff] [blame] | 104 | const xmlChar *URI; /* the full URI as computed */ |
| Daniel Veillard | aec6356 | 2003-03-23 20:42:17 +0000 | [diff] [blame] | 105 | int owner; /* does the entity own the childrens */ |
| Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame^] | 106 | }; |
| 107 | </pre><p> |
| 108 | |
| 109 | </p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlEntitiesTablePtr"></a>xmlEntitiesTablePtr</h3><pre class="programlisting">typedef xmlEntitiesTable *xmlEntitiesTablePtr; |
| 110 | </pre><p> |
| 111 | |
| 112 | </p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlInitializePredefinedEntities"></a>xmlInitializePredefinedEntities ()</h3><pre class="programlisting">void xmlInitializePredefinedEntities (void);</pre><p> |
| 113 | Set up the predefined entities.</p><p> |
| 114 | |
| 115 | </p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlAddDocEntity"></a>xmlAddDocEntity ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> xmlAddDocEntity (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, |
| 116 | const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name, |
| Daniel Veillard | 3592547 | 1999-02-25 08:46:07 +0000 | [diff] [blame] | 117 | int type, |
| Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame^] | 118 | const <a href="libxml-tree.html#xmlChar">xmlChar</a> *ExternalID, |
| 119 | const <a href="libxml-tree.html#xmlChar">xmlChar</a> *SystemID, |
| 120 | const <a href="libxml-tree.html#xmlChar">xmlChar</a> *content);</pre><p> |
| 121 | Register a new entity for this document.</p><p> |
| 122 | |
| 123 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>doc</tt></i> :</span></td><td> the document |
| 124 | </td></tr><tr><td><span class="term"><i><tt>name</tt></i> :</span></td><td> the entity name |
| 125 | </td></tr><tr><td><span class="term"><i><tt>type</tt></i> :</span></td><td> the entity type XML_xxx_yyy_ENTITY |
| 126 | </td></tr><tr><td><span class="term"><i><tt>ExternalID</tt></i> :</span></td><td> the entity external ID if available |
| 127 | </td></tr><tr><td><span class="term"><i><tt>SystemID</tt></i> :</span></td><td> the entity system ID if available |
| 128 | </td></tr><tr><td><span class="term"><i><tt>content</tt></i> :</span></td><td> the entity content |
| 129 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>a pointer to the entity or NULL in case of error |
| 130 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlAddDtdEntity"></a>xmlAddDtdEntity ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> xmlAddDtdEntity (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, |
| 131 | const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name, |
| Daniel Veillard | 3592547 | 1999-02-25 08:46:07 +0000 | [diff] [blame] | 132 | int type, |
| Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame^] | 133 | const <a href="libxml-tree.html#xmlChar">xmlChar</a> *ExternalID, |
| 134 | const <a href="libxml-tree.html#xmlChar">xmlChar</a> *SystemID, |
| 135 | const <a href="libxml-tree.html#xmlChar">xmlChar</a> *content);</pre><p> |
| 136 | Register a new entity for this document DTD external subset.</p><p> |
| 137 | |
| 138 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>doc</tt></i> :</span></td><td> the document |
| 139 | </td></tr><tr><td><span class="term"><i><tt>name</tt></i> :</span></td><td> the entity name |
| 140 | </td></tr><tr><td><span class="term"><i><tt>type</tt></i> :</span></td><td> the entity type XML_xxx_yyy_ENTITY |
| 141 | </td></tr><tr><td><span class="term"><i><tt>ExternalID</tt></i> :</span></td><td> the entity external ID if available |
| 142 | </td></tr><tr><td><span class="term"><i><tt>SystemID</tt></i> :</span></td><td> the entity system ID if available |
| 143 | </td></tr><tr><td><span class="term"><i><tt>content</tt></i> :</span></td><td> the entity content |
| 144 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>a pointer to the entity or NULL in case of error |
| 145 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlGetPredefinedEntity"></a>xmlGetPredefinedEntity ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> xmlGetPredefinedEntity (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name);</pre><p> |
| 146 | Check whether this name is an predefined entity.</p><p> |
| 147 | |
| 148 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>name</tt></i> :</span></td><td> the entity name |
| 149 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>NULL if not, otherwise the entity |
| 150 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlGetDocEntity"></a>xmlGetDocEntity ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> xmlGetDocEntity (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, |
| 151 | const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name);</pre><p> |
| 152 | Do an entity lookup in the document entity hash table and |
| Daniel Veillard | cbaf399 | 2001-12-31 16:16:02 +0000 | [diff] [blame] | 153 | returns the corresponding entity, otherwise a lookup is done |
| Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame^] | 154 | in the predefined entities too.</p><p> |
| 155 | |
| 156 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>doc</tt></i> :</span></td><td> the document referencing the entity |
| 157 | </td></tr><tr><td><span class="term"><i><tt>name</tt></i> :</span></td><td> the entity name |
| 158 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>A pointer to the entity structure or NULL if not found. |
| 159 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlGetDtdEntity"></a>xmlGetDtdEntity ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> xmlGetDtdEntity (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, |
| 160 | const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name);</pre><p> |
| 161 | Do an entity lookup in the DTD entity hash table and |
| Daniel Veillard | 5f4b599 | 2002-02-20 10:22:49 +0000 | [diff] [blame] | 162 | returns the corresponding entity, if found. |
| Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame^] | 163 | Note: the first argument is the document node, not the DTD node.</p><p> |
| 164 | |
| 165 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>doc</tt></i> :</span></td><td> the document referencing the entity |
| 166 | </td></tr><tr><td><span class="term"><i><tt>name</tt></i> :</span></td><td> the entity name |
| 167 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>A pointer to the entity structure or NULL if not found. |
| 168 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlGetParameterEntity"></a>xmlGetParameterEntity ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> xmlGetParameterEntity (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, |
| 169 | const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name);</pre><p> |
| 170 | Do an entity lookup in the internal and external subsets and |
| 171 | returns the corresponding parameter entity, if found.</p><p> |
| 172 | |
| 173 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>doc</tt></i> :</span></td><td> the document referencing the entity |
| 174 | </td></tr><tr><td><span class="term"><i><tt>name</tt></i> :</span></td><td> the entity name |
| 175 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>A pointer to the entity structure or NULL if not found. |
| 176 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlEncodeEntities"></a>xmlEncodeEntities ()</h3><pre class="programlisting">const <a href="libxml-tree.html#xmlChar">xmlChar</a>* xmlEncodeEntities (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, |
| 177 | const <a href="libxml-tree.html#xmlChar">xmlChar</a> *input);</pre><p> |
| 178 | Do a global encoding of a string, replacing the predefined entities |
| 179 | and non ASCII values with their entities and CharRef counterparts. |
| 180 | </p><p> |
| 181 | TODO: remove xmlEncodeEntities, once we are not afraid of breaking binary |
| 182 | compatibility |
| 183 | </p><p> |
| 184 | People must migrate their code to xmlEncodeEntitiesReentrant ! |
| 185 | This routine will issue a warning when encountered.</p><p> |
| 186 | |
| 187 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>doc</tt></i> :</span></td><td> the document containing the string |
| 188 | </td></tr><tr><td><span class="term"><i><tt>input</tt></i> :</span></td><td> A string to convert to XML. |
| 189 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>A newly allocated string with the substitution done. |
| 190 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlEncodeEntitiesReentrant"></a>xmlEncodeEntitiesReentrant ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlChar">xmlChar</a>* xmlEncodeEntitiesReentrant (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, |
| 191 | const <a href="libxml-tree.html#xmlChar">xmlChar</a> *input);</pre><p> |
| 192 | Do a global encoding of a string, replacing the predefined entities |
| Daniel Veillard | 1566d3a | 1999-07-15 14:24:29 +0000 | [diff] [blame] | 193 | and non ASCII values with their entities and CharRef counterparts. |
| 194 | Contrary to xmlEncodeEntities, this routine is reentrant, and result |
| Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame^] | 195 | must be deallocated.</p><p> |
| 196 | |
| 197 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>doc</tt></i> :</span></td><td> the document containing the string |
| 198 | </td></tr><tr><td><span class="term"><i><tt>input</tt></i> :</span></td><td> A string to convert to XML. |
| 199 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>A newly allocated string with the substitution done. |
| 200 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlEncodeSpecialChars"></a>xmlEncodeSpecialChars ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlChar">xmlChar</a>* xmlEncodeSpecialChars (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, |
| 201 | const <a href="libxml-tree.html#xmlChar">xmlChar</a> *input);</pre><p> |
| 202 | Do a global encoding of a string, replacing the predefined entities |
| 203 | this routine is reentrant, and result must be deallocated.</p><p> |
| 204 | |
| 205 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>doc</tt></i> :</span></td><td> the document containing the string |
| 206 | </td></tr><tr><td><span class="term"><i><tt>input</tt></i> :</span></td><td> A string to convert to XML. |
| 207 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>A newly allocated string with the substitution done. |
| 208 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlCreateEntitiesTable"></a>xmlCreateEntitiesTable ()</h3><pre class="programlisting"><a href="libxml-entities.html#xmlEntitiesTablePtr">xmlEntitiesTablePtr</a> xmlCreateEntitiesTable (void);</pre><p> |
| 209 | create and initialize an empty entities hash table.</p><p> |
| 210 | |
| 211 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the xmlEntitiesTablePtr just created or NULL in case of error. |
| 212 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlCopyEntitiesTable"></a>xmlCopyEntitiesTable ()</h3><pre class="programlisting"><a href="libxml-entities.html#xmlEntitiesTablePtr">xmlEntitiesTablePtr</a> xmlCopyEntitiesTable (<a href="libxml-entities.html#xmlEntitiesTablePtr">xmlEntitiesTablePtr</a> table);</pre><p> |
| 213 | Build a copy of an entity table.</p><p> |
| 214 | |
| 215 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>table</tt></i> :</span></td><td> An entity table |
| 216 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the new xmlEntitiesTablePtr or NULL in case of error. |
| 217 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlFreeEntitiesTable"></a>xmlFreeEntitiesTable ()</h3><pre class="programlisting">void xmlFreeEntitiesTable (<a href="libxml-entities.html#xmlEntitiesTablePtr">xmlEntitiesTablePtr</a> table);</pre><p> |
| 218 | Deallocate the memory used by an entities hash table.</p><p> |
| 219 | |
| 220 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>table</tt></i> :</span></td><td> An entity table |
| 221 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlDumpEntitiesTable"></a>xmlDumpEntitiesTable ()</h3><pre class="programlisting">void xmlDumpEntitiesTable (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, |
| 222 | <a href="libxml-entities.html#xmlEntitiesTablePtr">xmlEntitiesTablePtr</a> table);</pre><p> |
| 223 | This will dump the content of the entity table as an XML DTD definition</p><p> |
| 224 | |
| 225 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>buf</tt></i> :</span></td><td> An XML buffer. |
| 226 | </td></tr><tr><td><span class="term"><i><tt>table</tt></i> :</span></td><td> An entity table |
| 227 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlDumpEntityDecl"></a>xmlDumpEntityDecl ()</h3><pre class="programlisting">void xmlDumpEntityDecl (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, |
| 228 | <a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> ent);</pre><p> |
| 229 | This will dump the content of the entity table as an XML DTD definition</p><p> |
| 230 | |
| 231 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>buf</tt></i> :</span></td><td> An XML buffer. |
| 232 | </td></tr><tr><td><span class="term"><i><tt>ent</tt></i> :</span></td><td> An entity table |
| 233 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlCleanupPredefinedEntities"></a>xmlCleanupPredefinedEntities ()</h3><pre class="programlisting">void xmlCleanupPredefinedEntities (void);</pre><p> |
| 234 | Cleanup up the predefined entities table.</p><p> |
| 235 | |
| 236 | </p></div></div></div><table xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle"><td align="left"><a accesskey="p" href="libxml-tree.html"><b><< tree</b></a></td><td align="right"><a accesskey="n" href="libxml-valid.html"><b>valid >></b></a></td></tr></table></body></html> |