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>xmlIO</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-nanoftp.html" title="nanoftp"><link rel="next" href="libxml-catalog.html" title="catalog"></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-nanoftp.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-catalog.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-xmlIO"></a><div class="titlepage"></div><div class="refnamediv"><h2>xmlIO</h2><p>xmlIO — </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis"> |
| 33 | |
| 34 | |
| 35 | |
| 36 | int (<a href="libxml-xmlIO.html#xmlInputMatchCallback">*xmlInputMatchCallback</a>) (char const *filename); |
| 37 | void* (<a href="libxml-xmlIO.html#xmlInputOpenCallback">*xmlInputOpenCallback</a>) (char const *filename); |
| 38 | int (<a href="libxml-xmlIO.html#xmlInputReadCallback">*xmlInputReadCallback</a>) (void *context, |
| 39 | char *buffer, |
| 40 | int len); |
| 41 | int (<a href="libxml-xmlIO.html#xmlInputCloseCallback">*xmlInputCloseCallback</a>) (void *context); |
| 42 | int (<a href="libxml-xmlIO.html#xmlOutputMatchCallback">*xmlOutputMatchCallback</a>) (char const *filename); |
| 43 | void* (<a href="libxml-xmlIO.html#xmlOutputOpenCallback">*xmlOutputOpenCallback</a>) (char const *filename); |
| 44 | int (<a href="libxml-xmlIO.html#xmlOutputWriteCallback">*xmlOutputWriteCallback</a>) (void *context, |
| 45 | const char *buffer, |
| 46 | int len); |
| 47 | int (<a href="libxml-xmlIO.html#xmlOutputCloseCallback">*xmlOutputCloseCallback</a>) (void *context); |
| 48 | struct <a href="libxml-tree.html#xmlParserInputBuffer">xmlParserInputBuffer</a>; |
| 49 | struct <a href="libxml-tree.html#xmlOutputBuffer">xmlOutputBuffer</a>; |
| 50 | void <a href="libxml-xmlIO.html#xmlCleanupInputCallbacks">xmlCleanupInputCallbacks</a> (void); |
| 51 | void <a href="libxml-xmlIO.html#xmlCleanupOutputCallbacks">xmlCleanupOutputCallbacks</a> (void); |
| 52 | void <a href="libxml-xmlIO.html#xmlRegisterDefaultInputCallbacks">xmlRegisterDefaultInputCallbacks</a> |
| 53 | (void); |
| 54 | <a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> <a href="libxml-xmlIO.html#xmlAllocParserInputBuffer">xmlAllocParserInputBuffer</a> |
| 55 | (<a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc); |
| 56 | <a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> <a href="libxml-xmlIO.html#xmlParserInputBufferCreateFilename">xmlParserInputBufferCreateFilename</a> |
| 57 | (const char *URI, |
| 58 | <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc); |
| 59 | <a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> <a href="libxml-xmlIO.html#xmlParserInputBufferCreateFile">xmlParserInputBufferCreateFile</a> |
| 60 | (<GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="FILE-CAPS">FILE</GTKDOCLINK> *file, |
| 61 | <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc); |
| 62 | <a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> <a href="libxml-xmlIO.html#xmlParserInputBufferCreateFd">xmlParserInputBufferCreateFd</a> |
| 63 | (int fd, |
| 64 | <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc); |
| 65 | <a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> <a href="libxml-xmlIO.html#xmlParserInputBufferCreateMem">xmlParserInputBufferCreateMem</a> |
| 66 | (const char *mem, |
| 67 | int size, |
| 68 | <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc); |
| 69 | <a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> <a href="libxml-xmlIO.html#xmlParserInputBufferCreateIO">xmlParserInputBufferCreateIO</a> |
| 70 | (<a href="libxml-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> ioread, |
| 71 | <a href="libxml-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> ioclose, |
| 72 | void *ioctx, |
| 73 | <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc); |
| 74 | int <a href="libxml-xmlIO.html#xmlParserInputBufferRead">xmlParserInputBufferRead</a> (<a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> in, |
| 75 | int len); |
| 76 | int <a href="libxml-xmlIO.html#xmlParserInputBufferGrow">xmlParserInputBufferGrow</a> (<a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> in, |
| 77 | int len); |
| 78 | int <a href="libxml-xmlIO.html#xmlParserInputBufferPush">xmlParserInputBufferPush</a> (<a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> in, |
| 79 | int len, |
| 80 | const char *buf); |
| 81 | void <a href="libxml-xmlIO.html#xmlFreeParserInputBuffer">xmlFreeParserInputBuffer</a> (<a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> in); |
| 82 | char* <a href="libxml-xmlIO.html#xmlParserGetDirectory">xmlParserGetDirectory</a> (const char *filename); |
| 83 | int <a href="libxml-xmlIO.html#xmlRegisterInputCallbacks">xmlRegisterInputCallbacks</a> (<a href="libxml-xmlIO.html#xmlInputMatchCallback">xmlInputMatchCallback</a> matchFunc, |
| 84 | <a href="libxml-xmlIO.html#xmlInputOpenCallback">xmlInputOpenCallback</a> openFunc, |
| 85 | <a href="libxml-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> readFunc, |
| 86 | <a href="libxml-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> closeFunc); |
| 87 | void <a href="libxml-xmlIO.html#xmlRegisterDefaultOutputCallbacks">xmlRegisterDefaultOutputCallbacks</a> |
| 88 | (void); |
| 89 | <a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> <a href="libxml-xmlIO.html#xmlAllocOutputBuffer">xmlAllocOutputBuffer</a> (<a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder); |
| 90 | <a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> <a href="libxml-xmlIO.html#xmlOutputBufferCreateFilename">xmlOutputBufferCreateFilename</a> |
| 91 | (const char *URI, |
| 92 | <a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder, |
| 93 | int compression); |
| 94 | <a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> <a href="libxml-xmlIO.html#xmlOutputBufferCreateFile">xmlOutputBufferCreateFile</a> |
| 95 | (<GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="FILE-CAPS">FILE</GTKDOCLINK> *file, |
| 96 | <a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder); |
| 97 | <a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> <a href="libxml-xmlIO.html#xmlOutputBufferCreateFd">xmlOutputBufferCreateFd</a> (int fd, |
| 98 | <a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder); |
| 99 | <a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> <a href="libxml-xmlIO.html#xmlOutputBufferCreateIO">xmlOutputBufferCreateIO</a> (<a href="libxml-xmlIO.html#xmlOutputWriteCallback">xmlOutputWriteCallback</a> iowrite, |
| 100 | <a href="libxml-xmlIO.html#xmlOutputCloseCallback">xmlOutputCloseCallback</a> ioclose, |
| 101 | void *ioctx, |
| 102 | <a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder); |
| 103 | int <a href="libxml-xmlIO.html#xmlOutputBufferWrite">xmlOutputBufferWrite</a> (<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out, |
| 104 | int len, |
| 105 | const char *buf); |
| 106 | int <a href="libxml-xmlIO.html#xmlOutputBufferWriteString">xmlOutputBufferWriteString</a> (<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out, |
| 107 | const char *str); |
| 108 | int <a href="libxml-xmlIO.html#xmlOutputBufferFlush">xmlOutputBufferFlush</a> (<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out); |
| 109 | int <a href="libxml-xmlIO.html#xmlOutputBufferClose">xmlOutputBufferClose</a> (<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out); |
| 110 | int <a href="libxml-xmlIO.html#xmlRegisterOutputCallbacks">xmlRegisterOutputCallbacks</a> (<a href="libxml-xmlIO.html#xmlOutputMatchCallback">xmlOutputMatchCallback</a> matchFunc, |
| 111 | <a href="libxml-xmlIO.html#xmlOutputOpenCallback">xmlOutputOpenCallback</a> openFunc, |
| 112 | <a href="libxml-xmlIO.html#xmlOutputWriteCallback">xmlOutputWriteCallback</a> writeFunc, |
| 113 | <a href="libxml-xmlIO.html#xmlOutputCloseCallback">xmlOutputCloseCallback</a> closeFunc); |
| 114 | void* <a href="libxml-xmlIO.html#xmlIOHTTPOpenW">xmlIOHTTPOpenW</a> (const char *post_uri, |
| 115 | int compression); |
| 116 | void <a href="libxml-xmlIO.html#xmlRegisterHTTPPostCallbacks">xmlRegisterHTTPPostCallbacks</a> (void); |
| 117 | <a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> <a href="libxml-xmlIO.html#xmlNoNetExternalEntityLoader">xmlNoNetExternalEntityLoader</a> |
| 118 | (const char *URL, |
| 119 | const char *ID, |
| 120 | <a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt); |
| 121 | <a href="libxml-tree.html#xmlChar">xmlChar</a>* <a href="libxml-xmlIO.html#xmlNormalizeWindowsPath">xmlNormalizeWindowsPath</a> (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *path); |
| 122 | int <a href="libxml-xmlIO.html#xmlCheckFilename">xmlCheckFilename</a> (const char *path); |
| 123 | int <a href="libxml-xmlIO.html#xmlFileMatch">xmlFileMatch</a> (const char *filename); |
| 124 | void* <a href="libxml-xmlIO.html#xmlFileOpen">xmlFileOpen</a> (const char *filename); |
| 125 | int <a href="libxml-xmlIO.html#xmlFileRead">xmlFileRead</a> (void *context, |
| 126 | char *buffer, |
| 127 | int len); |
| 128 | int <a href="libxml-xmlIO.html#xmlFileClose">xmlFileClose</a> (void *context); |
| 129 | int <a href="libxml-xmlIO.html#xmlIOHTTPMatch">xmlIOHTTPMatch</a> (const char *filename); |
| 130 | void* <a href="libxml-xmlIO.html#xmlIOHTTPOpen">xmlIOHTTPOpen</a> (const char *filename); |
| 131 | int <a href="libxml-xmlIO.html#xmlIOHTTPRead">xmlIOHTTPRead</a> (void *context, |
| 132 | char *buffer, |
| 133 | int len); |
| 134 | int <a href="libxml-xmlIO.html#xmlIOHTTPClose">xmlIOHTTPClose</a> (void *context); |
| 135 | int <a href="libxml-xmlIO.html#xmlIOFTPMatch">xmlIOFTPMatch</a> (const char *filename); |
| 136 | void* <a href="libxml-xmlIO.html#xmlIOFTPOpen">xmlIOFTPOpen</a> (const char *filename); |
| 137 | int <a href="libxml-xmlIO.html#xmlIOFTPRead">xmlIOFTPRead</a> (void *context, |
| 138 | char *buffer, |
| 139 | int len); |
| 140 | int <a href="libxml-xmlIO.html#xmlIOFTPClose">xmlIOFTPClose</a> (void *context); |
| 141 | </pre></div><div class="refsect1" lang="en"><h2>Description</h2><p> |
| 142 | |
| 143 | </p></div><div class="refsect1" lang="en"><h2>Details</h2><div class="refsect2" lang="en"><h3><a name="xmlInputMatchCallback"></a>xmlInputMatchCallback ()</h3><pre class="programlisting">int (*xmlInputMatchCallback) (char const *filename);</pre><p> |
| 144 | Callback used in the I/O Input API to detect if the current handler |
| 145 | can provide input fonctionnalities for this resource.</p><p> |
| 146 | |
| 147 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>filename</tt></i> :</span></td><td> the filename or URI |
| 148 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>1 if yes and 0 if another Input module should be used |
| 149 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlInputOpenCallback"></a>xmlInputOpenCallback ()</h3><pre class="programlisting">void* (*xmlInputOpenCallback) (char const *filename);</pre><p> |
| 150 | Callback used in the I/O Input API to open the resource</p><p> |
| 151 | |
| 152 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>filename</tt></i> :</span></td><td> the filename or URI |
| 153 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlInputReadCallback"></a>xmlInputReadCallback ()</h3><pre class="programlisting">int (*xmlInputReadCallback) (void *context, |
| 154 | char *buffer, |
| 155 | int len);</pre><p> |
| 156 | Callback used in the I/O Input API to read the resource</p><p> |
| 157 | |
| 158 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>context</tt></i> :</span></td><td> an Input context |
| 159 | </td></tr><tr><td><span class="term"><i><tt>buffer</tt></i> :</span></td><td> the buffer to store data read |
| 160 | </td></tr><tr><td><span class="term"><i><tt>len</tt></i> :</span></td><td> the length of the buffer in bytes |
| 161 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the number of bytes read or -1 in case of error |
| 162 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlInputCloseCallback"></a>xmlInputCloseCallback ()</h3><pre class="programlisting">int (*xmlInputCloseCallback) (void *context);</pre><p> |
| 163 | Callback used in the I/O Input API to close the resource</p><p> |
| 164 | |
| 165 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>context</tt></i> :</span></td><td> an Input context |
| 166 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>0 or -1 in case of error |
| 167 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlOutputMatchCallback"></a>xmlOutputMatchCallback ()</h3><pre class="programlisting">int (*xmlOutputMatchCallback) (char const *filename);</pre><p> |
| 168 | Callback used in the I/O Output API to detect if the current handler |
| 169 | can provide output fonctionnalities for this resource.</p><p> |
| 170 | |
| 171 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>filename</tt></i> :</span></td><td> the filename or URI |
| 172 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>1 if yes and 0 if another Output module should be used |
| 173 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlOutputOpenCallback"></a>xmlOutputOpenCallback ()</h3><pre class="programlisting">void* (*xmlOutputOpenCallback) (char const *filename);</pre><p> |
| 174 | Callback used in the I/O Output API to open the resource</p><p> |
| 175 | |
| 176 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>filename</tt></i> :</span></td><td> the filename or URI |
| 177 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlOutputWriteCallback"></a>xmlOutputWriteCallback ()</h3><pre class="programlisting">int (*xmlOutputWriteCallback) (void *context, |
| 178 | const char *buffer, |
| 179 | int len);</pre><p> |
| 180 | Callback used in the I/O Output API to write to the resource</p><p> |
| 181 | |
| 182 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>context</tt></i> :</span></td><td> an Output context |
| 183 | </td></tr><tr><td><span class="term"><i><tt>buffer</tt></i> :</span></td><td> the buffer of data to write |
| 184 | </td></tr><tr><td><span class="term"><i><tt>len</tt></i> :</span></td><td> the length of the buffer in bytes |
| 185 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the number of bytes written or -1 in case of error |
| 186 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlOutputCloseCallback"></a>xmlOutputCloseCallback ()</h3><pre class="programlisting">int (*xmlOutputCloseCallback) (void *context);</pre><p> |
| 187 | Callback used in the I/O Output API to close the resource</p><p> |
| 188 | |
| 189 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>context</tt></i> :</span></td><td> an Output context |
| 190 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>0 or -1 in case of error |
| 191 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlParserInputBuffer"></a>struct xmlParserInputBuffer</h3><pre class="programlisting">struct xmlParserInputBuffer { |
| 192 | void* context; |
| 193 | xmlInputReadCallback readcallback; |
| 194 | xmlInputCloseCallback closecallback; |
| 195 | |
| 196 | xmlCharEncodingHandlerPtr encoder; /* I18N conversions to UTF-8 */ |
| 197 | |
| 198 | xmlBufferPtr buffer; /* Local buffer encoded in UTF-8 */ |
| 199 | xmlBufferPtr raw; /* if encoder != NULL buffer for raw input */ |
| 200 | }; |
| 201 | </pre><p> |
| 202 | |
| 203 | </p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlOutputBuffer"></a>struct xmlOutputBuffer</h3><pre class="programlisting">struct xmlOutputBuffer { |
| 204 | void* context; |
| 205 | xmlOutputWriteCallback writecallback; |
| 206 | xmlOutputCloseCallback closecallback; |
| 207 | |
| 208 | xmlCharEncodingHandlerPtr encoder; /* I18N conversions to UTF-8 */ |
| 209 | |
| 210 | xmlBufferPtr buffer; /* Local buffer encoded in UTF-8 or ISOLatin */ |
| 211 | xmlBufferPtr conv; /* if encoder != NULL buffer for output */ |
| 212 | int written; /* total number of byte written */ |
| 213 | }; |
| 214 | </pre><p> |
| 215 | |
| 216 | </p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlCleanupInputCallbacks"></a>xmlCleanupInputCallbacks ()</h3><pre class="programlisting">void xmlCleanupInputCallbacks (void);</pre><p> |
| 217 | clears the entire input callback table. this includes the |
| 218 | compiled-in I/O.</p><p> |
| 219 | |
| 220 | </p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlCleanupOutputCallbacks"></a>xmlCleanupOutputCallbacks ()</h3><pre class="programlisting">void xmlCleanupOutputCallbacks (void);</pre><p> |
| 221 | clears the entire output callback table. this includes the |
| 222 | compiled-in I/O callbacks.</p><p> |
| 223 | |
| 224 | </p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlRegisterDefaultInputCallbacks"></a>xmlRegisterDefaultInputCallbacks ()</h3><pre class="programlisting">void xmlRegisterDefaultInputCallbacks |
| 225 | (void);</pre><p> |
| 226 | Registers the default compiled-in I/O handlers.</p><p> |
| 227 | |
| 228 | </p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlAllocParserInputBuffer"></a>xmlAllocParserInputBuffer ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> xmlAllocParserInputBuffer |
| 229 | (<a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc);</pre><p> |
| 230 | Create a buffered parser input for progressive parsing</p><p> |
| 231 | |
| 232 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>enc</tt></i> :</span></td><td> the charset encoding if known |
| 233 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the new parser input or NULL |
| 234 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlParserInputBufferCreateFilename"></a>xmlParserInputBufferCreateFilename ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> xmlParserInputBufferCreateFilename |
| 235 | (const char *URI, |
| 236 | <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc);</pre><p> |
| 237 | Create a buffered parser input for the progressive parsing of a file |
| 238 | If filename is "-' then we use stdin as the input. |
| 239 | Automatic support for ZLIB/Compress compressed document is provided |
| 240 | by default if found at compile-time. |
| 241 | Do an encoding check if enc == XML_CHAR_ENCODING_NONE</p><p> |
| 242 | |
| 243 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>URI</tt></i> :</span></td><td> a C string containing the URI or filename |
| 244 | </td></tr><tr><td><span class="term"><i><tt>enc</tt></i> :</span></td><td> the charset encoding if known |
| 245 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the new parser input or NULL |
| 246 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlParserInputBufferCreateFile"></a>xmlParserInputBufferCreateFile ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> xmlParserInputBufferCreateFile |
| 247 | (<GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="FILE-CAPS">FILE</GTKDOCLINK> *file, |
| 248 | <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc);</pre><p> |
| 249 | Create a buffered parser input for the progressive parsing of a FILE * |
| 250 | buffered C I/O</p><p> |
| 251 | |
| 252 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>file</tt></i> :</span></td><td> a FILE* |
| 253 | </td></tr><tr><td><span class="term"><i><tt>enc</tt></i> :</span></td><td> the charset encoding if known |
| 254 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the new parser input or NULL |
| 255 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlParserInputBufferCreateFd"></a>xmlParserInputBufferCreateFd ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> xmlParserInputBufferCreateFd |
| 256 | (int fd, |
| 257 | <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc);</pre><p> |
| 258 | Create a buffered parser input for the progressive parsing for the input |
| 259 | from a file descriptor</p><p> |
| 260 | |
| 261 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>fd</tt></i> :</span></td><td> a file descriptor number |
| 262 | </td></tr><tr><td><span class="term"><i><tt>enc</tt></i> :</span></td><td> the charset encoding if known |
| 263 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the new parser input or NULL |
| 264 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlParserInputBufferCreateMem"></a>xmlParserInputBufferCreateMem ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> xmlParserInputBufferCreateMem |
| 265 | (const char *mem, |
| 266 | int size, |
| 267 | <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc);</pre><p> |
| 268 | Create a buffered parser input for the progressive parsing for the input |
| 269 | from a memory area.</p><p> |
| 270 | |
| 271 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>mem</tt></i> :</span></td><td> the memory input |
| 272 | </td></tr><tr><td><span class="term"><i><tt>size</tt></i> :</span></td><td> the length of the memory block |
| 273 | </td></tr><tr><td><span class="term"><i><tt>enc</tt></i> :</span></td><td> the charset encoding if known |
| 274 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the new parser input or NULL |
| 275 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlParserInputBufferCreateIO"></a>xmlParserInputBufferCreateIO ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> xmlParserInputBufferCreateIO |
| 276 | (<a href="libxml-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> ioread, |
| 277 | <a href="libxml-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> ioclose, |
| 278 | void *ioctx, |
| 279 | <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc);</pre><p> |
| 280 | Create a buffered parser input for the progressive parsing for the input |
| 281 | from an I/O handler</p><p> |
| 282 | |
| 283 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ioread</tt></i> :</span></td><td> an I/O read function |
| 284 | </td></tr><tr><td><span class="term"><i><tt>ioclose</tt></i> :</span></td><td> an I/O close function |
| 285 | </td></tr><tr><td><span class="term"><i><tt>ioctx</tt></i> :</span></td><td> an I/O handler |
| 286 | </td></tr><tr><td><span class="term"><i><tt>enc</tt></i> :</span></td><td> the charset encoding if known |
| 287 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the new parser input or NULL |
| 288 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlParserInputBufferRead"></a>xmlParserInputBufferRead ()</h3><pre class="programlisting">int xmlParserInputBufferRead (<a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> in, |
| 289 | int len);</pre><p> |
| 290 | Refresh the content of the input buffer, the old data are considered |
| 291 | consumed |
| 292 | This routine handle the I18N transcoding to internal UTF-8</p><p> |
| 293 | |
| 294 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>in</tt></i> :</span></td><td> a buffered parser input |
| 295 | </td></tr><tr><td><span class="term"><i><tt>len</tt></i> :</span></td><td> indicative value of the amount of chars to read |
| 296 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the number of chars read and stored in the buffer, or -1 |
| 297 | in case of error. |
| 298 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlParserInputBufferGrow"></a>xmlParserInputBufferGrow ()</h3><pre class="programlisting">int xmlParserInputBufferGrow (<a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> in, |
| 299 | int len);</pre><p> |
| 300 | Grow up the content of the input buffer, the old data are preserved |
| 301 | This routine handle the I18N transcoding to internal UTF-8 |
| 302 | This routine is used when operating the parser in normal (pull) mode |
| 303 | </p><p> |
| 304 | TODO: one should be able to remove one extra copy by copying directly |
| 305 | onto in->buffer or in->raw</p><p> |
| 306 | |
| 307 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>in</tt></i> :</span></td><td> a buffered parser input |
| 308 | </td></tr><tr><td><span class="term"><i><tt>len</tt></i> :</span></td><td> indicative value of the amount of chars to read |
| 309 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the number of chars read and stored in the buffer, or -1 |
| 310 | in case of error. |
| 311 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlParserInputBufferPush"></a>xmlParserInputBufferPush ()</h3><pre class="programlisting">int xmlParserInputBufferPush (<a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> in, |
| 312 | int len, |
| 313 | const char *buf);</pre><p> |
| 314 | Push the content of the arry in the input buffer |
| 315 | This routine handle the I18N transcoding to internal UTF-8 |
| 316 | This is used when operating the parser in progressive (push) mode.</p><p> |
| 317 | |
| 318 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>in</tt></i> :</span></td><td> a buffered parser input |
| 319 | </td></tr><tr><td><span class="term"><i><tt>len</tt></i> :</span></td><td> the size in bytes of the array. |
| 320 | </td></tr><tr><td><span class="term"><i><tt>buf</tt></i> :</span></td><td> an char array |
| 321 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the number of chars read and stored in the buffer, or -1 |
| 322 | in case of error. |
| 323 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlFreeParserInputBuffer"></a>xmlFreeParserInputBuffer ()</h3><pre class="programlisting">void xmlFreeParserInputBuffer (<a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> in);</pre><p> |
| 324 | Free up the memory used by a buffered parser input</p><p> |
| 325 | |
| 326 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>in</tt></i> :</span></td><td> a buffered parser input |
| 327 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlParserGetDirectory"></a>xmlParserGetDirectory ()</h3><pre class="programlisting">char* xmlParserGetDirectory (const char *filename);</pre><p> |
| 328 | lookup the directory for that file</p><p> |
| 329 | |
| 330 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>filename</tt></i> :</span></td><td> the path to a file |
| 331 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>a new allocated string containing the directory, or NULL. |
| 332 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlRegisterInputCallbacks"></a>xmlRegisterInputCallbacks ()</h3><pre class="programlisting">int xmlRegisterInputCallbacks (<a href="libxml-xmlIO.html#xmlInputMatchCallback">xmlInputMatchCallback</a> matchFunc, |
| 333 | <a href="libxml-xmlIO.html#xmlInputOpenCallback">xmlInputOpenCallback</a> openFunc, |
| 334 | <a href="libxml-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> readFunc, |
| 335 | <a href="libxml-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> closeFunc);</pre><p> |
| 336 | Register a new set of I/O callback for handling parser input.</p><p> |
| 337 | |
| 338 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>matchFunc</tt></i> :</span></td><td> the xmlInputMatchCallback |
| 339 | </td></tr><tr><td><span class="term"><i><tt>openFunc</tt></i> :</span></td><td> the xmlInputOpenCallback |
| 340 | </td></tr><tr><td><span class="term"><i><tt>readFunc</tt></i> :</span></td><td> the xmlInputReadCallback |
| 341 | </td></tr><tr><td><span class="term"><i><tt>closeFunc</tt></i> :</span></td><td> the xmlInputCloseCallback |
| 342 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the registered handler number or -1 in case of error |
| 343 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlRegisterDefaultOutputCallbacks"></a>xmlRegisterDefaultOutputCallbacks ()</h3><pre class="programlisting">void xmlRegisterDefaultOutputCallbacks |
| 344 | (void);</pre><p> |
| 345 | Registers the default compiled-in I/O handlers.</p><p> |
| 346 | |
| 347 | </p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlAllocOutputBuffer"></a>xmlAllocOutputBuffer ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> xmlAllocOutputBuffer (<a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder);</pre><p> |
| 348 | Create a buffered parser output</p><p> |
| 349 | |
| 350 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>encoder</tt></i> :</span></td><td> the encoding converter or NULL |
| 351 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the new parser output or NULL |
| 352 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlOutputBufferCreateFilename"></a>xmlOutputBufferCreateFilename ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> xmlOutputBufferCreateFilename |
| 353 | (const char *URI, |
| 354 | <a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder, |
| 355 | int compression);</pre><p> |
| 356 | Create a buffered output for the progressive saving of a file |
| 357 | If filename is "-' then we use stdout as the output. |
| 358 | Automatic support for ZLIB/Compress compressed document is provided |
| 359 | by default if found at compile-time. |
| 360 | TODO: currently if compression is set, the library only support |
| 361 | writing to a local file.</p><p> |
| 362 | |
| 363 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>URI</tt></i> :</span></td><td> a C string containing the URI or filename |
| 364 | </td></tr><tr><td><span class="term"><i><tt>encoder</tt></i> :</span></td><td> the encoding converter or NULL |
| 365 | </td></tr><tr><td><span class="term"><i><tt>compression</tt></i> :</span></td><td> the compression ration (0 none, 9 max). |
| 366 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the new output or NULL |
| 367 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlOutputBufferCreateFile"></a>xmlOutputBufferCreateFile ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> xmlOutputBufferCreateFile |
| 368 | (<GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="FILE-CAPS">FILE</GTKDOCLINK> *file, |
| 369 | <a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder);</pre><p> |
| 370 | Create a buffered output for the progressive saving to a FILE * |
| 371 | buffered C I/O</p><p> |
| 372 | |
| 373 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>file</tt></i> :</span></td><td> a FILE* |
| 374 | </td></tr><tr><td><span class="term"><i><tt>encoder</tt></i> :</span></td><td> the encoding converter or NULL |
| 375 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the new parser output or NULL |
| 376 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlOutputBufferCreateFd"></a>xmlOutputBufferCreateFd ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> xmlOutputBufferCreateFd (int fd, |
| 377 | <a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder);</pre><p> |
| 378 | Create a buffered output for the progressive saving |
| 379 | to a file descriptor</p><p> |
| 380 | |
| 381 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>fd</tt></i> :</span></td><td> a file descriptor number |
| 382 | </td></tr><tr><td><span class="term"><i><tt>encoder</tt></i> :</span></td><td> the encoding converter or NULL |
| 383 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the new parser output or NULL |
| 384 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlOutputBufferCreateIO"></a>xmlOutputBufferCreateIO ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> xmlOutputBufferCreateIO (<a href="libxml-xmlIO.html#xmlOutputWriteCallback">xmlOutputWriteCallback</a> iowrite, |
| 385 | <a href="libxml-xmlIO.html#xmlOutputCloseCallback">xmlOutputCloseCallback</a> ioclose, |
| 386 | void *ioctx, |
| 387 | <a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder);</pre><p> |
| 388 | Create a buffered output for the progressive saving |
| 389 | to an I/O handler</p><p> |
| 390 | |
| 391 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>iowrite</tt></i> :</span></td><td> an I/O write function |
| 392 | </td></tr><tr><td><span class="term"><i><tt>ioclose</tt></i> :</span></td><td> an I/O close function |
| 393 | </td></tr><tr><td><span class="term"><i><tt>ioctx</tt></i> :</span></td><td> an I/O handler |
| 394 | </td></tr><tr><td><span class="term"><i><tt>encoder</tt></i> :</span></td><td> the charset encoding if known |
| 395 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the new parser output or NULL |
| 396 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlOutputBufferWrite"></a>xmlOutputBufferWrite ()</h3><pre class="programlisting">int xmlOutputBufferWrite (<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out, |
| 397 | int len, |
| 398 | const char *buf);</pre><p> |
| 399 | Write the content of the array in the output I/O buffer |
| 400 | This routine handle the I18N transcoding from internal UTF-8 |
| 401 | The buffer is lossless, i.e. will store in case of partial |
| 402 | or delayed writes.</p><p> |
| 403 | |
| 404 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>out</tt></i> :</span></td><td> a buffered parser output |
| 405 | </td></tr><tr><td><span class="term"><i><tt>len</tt></i> :</span></td><td> the size in bytes of the array. |
| 406 | </td></tr><tr><td><span class="term"><i><tt>buf</tt></i> :</span></td><td> an char array |
| 407 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the number of chars immediately written, or -1 |
| 408 | in case of error. |
| 409 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlOutputBufferWriteString"></a>xmlOutputBufferWriteString ()</h3><pre class="programlisting">int xmlOutputBufferWriteString (<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out, |
| 410 | const char *str);</pre><p> |
| 411 | Write the content of the string in the output I/O buffer |
| 412 | This routine handle the I18N transcoding from internal UTF-8 |
| 413 | The buffer is lossless, i.e. will store in case of partial |
| 414 | or delayed writes.</p><p> |
| 415 | |
| 416 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>out</tt></i> :</span></td><td> a buffered parser output |
| 417 | </td></tr><tr><td><span class="term"><i><tt>str</tt></i> :</span></td><td> a zero terminated C string |
| 418 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the number of chars immediately written, or -1 |
| 419 | in case of error. |
| 420 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlOutputBufferFlush"></a>xmlOutputBufferFlush ()</h3><pre class="programlisting">int xmlOutputBufferFlush (<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out);</pre><p> |
| 421 | flushes the output I/O channel</p><p> |
| 422 | |
| 423 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>out</tt></i> :</span></td><td> a buffered output |
| 424 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the number of byte written or -1 in case of error. |
| 425 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlOutputBufferClose"></a>xmlOutputBufferClose ()</h3><pre class="programlisting">int xmlOutputBufferClose (<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out);</pre><p> |
| 426 | flushes and close the output I/O channel |
| 427 | and free up all the associated resources</p><p> |
| 428 | |
| 429 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>out</tt></i> :</span></td><td> a buffered output |
| 430 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the number of byte written or -1 in case of error. |
| 431 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlRegisterOutputCallbacks"></a>xmlRegisterOutputCallbacks ()</h3><pre class="programlisting">int xmlRegisterOutputCallbacks (<a href="libxml-xmlIO.html#xmlOutputMatchCallback">xmlOutputMatchCallback</a> matchFunc, |
| 432 | <a href="libxml-xmlIO.html#xmlOutputOpenCallback">xmlOutputOpenCallback</a> openFunc, |
| 433 | <a href="libxml-xmlIO.html#xmlOutputWriteCallback">xmlOutputWriteCallback</a> writeFunc, |
| 434 | <a href="libxml-xmlIO.html#xmlOutputCloseCallback">xmlOutputCloseCallback</a> closeFunc);</pre><p> |
| 435 | Register a new set of I/O callback for handling output.</p><p> |
| 436 | |
| 437 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>matchFunc</tt></i> :</span></td><td> the xmlOutputMatchCallback |
| 438 | </td></tr><tr><td><span class="term"><i><tt>openFunc</tt></i> :</span></td><td> the xmlOutputOpenCallback |
| 439 | </td></tr><tr><td><span class="term"><i><tt>writeFunc</tt></i> :</span></td><td> the xmlOutputWriteCallback |
| 440 | </td></tr><tr><td><span class="term"><i><tt>closeFunc</tt></i> :</span></td><td> the xmlOutputCloseCallback |
| 441 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the registered handler number or -1 in case of error |
| 442 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlIOHTTPOpenW"></a>xmlIOHTTPOpenW ()</h3><pre class="programlisting">void* xmlIOHTTPOpenW (const char *post_uri, |
| 443 | int compression);</pre><p> |
| 444 | Open a temporary buffer to collect the document for a subsequent HTTP POST |
| 445 | request. Non-static as is called from the output buffer creation routine.</p><p> |
| 446 | |
| 447 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>post_uri</tt></i> :</span></td><td> The destination URI for the document |
| 448 | </td></tr><tr><td><span class="term"><i><tt>compression</tt></i> :</span></td><td> The compression desired for the document. |
| 449 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlRegisterHTTPPostCallbacks"></a>xmlRegisterHTTPPostCallbacks ()</h3><pre class="programlisting">void xmlRegisterHTTPPostCallbacks (void);</pre><p> |
| 450 | By default, libxml submits HTTP output requests using the "PUT" method. |
| 451 | Calling this method changes the HTTP output method to use the "POST" |
| 452 | method instead.</p><p> |
| 453 | |
| 454 | </p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlNoNetExternalEntityLoader"></a>xmlNoNetExternalEntityLoader ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> xmlNoNetExternalEntityLoader |
| 455 | (const char *URL, |
| 456 | const char *ID, |
| 457 | <a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);</pre><p> |
| 458 | A specific entity loader disabling network accesses, though still |
| 459 | allowing local catalog accesses for resolution.</p><p> |
| 460 | |
| 461 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>URL</tt></i> :</span></td><td> the URL for the entity to load |
| 462 | </td></tr><tr><td><span class="term"><i><tt>ID</tt></i> :</span></td><td> the System ID for the entity to load |
| 463 | </td></tr><tr><td><span class="term"><i><tt>ctxt</tt></i> :</span></td><td> the context in which the entity is called or NULL |
| 464 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>a new allocated xmlParserInputPtr, or NULL. |
| 465 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlNormalizeWindowsPath"></a>xmlNormalizeWindowsPath ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlChar">xmlChar</a>* xmlNormalizeWindowsPath (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *path);</pre><p> |
| 466 | This function is obsolete. Please see xmlURIFromPath in uri.c for |
| 467 | a better solution.</p><p> |
| 468 | |
| 469 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>path</tt></i> :</span></td><td> the input file path |
| 470 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>a canonicalized version of the path |
| 471 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlCheckFilename"></a>xmlCheckFilename ()</h3><pre class="programlisting">int xmlCheckFilename (const char *path);</pre><p> |
| 472 | function checks to see if <i><tt>path</tt></i> is a valid source |
| 473 | (file, socket...) for XML. |
| 474 | </p><p> |
| 475 | if stat is not available on the target machine, |
| 476 | returns 1. if stat fails, returns 0 (if calling |
| 477 | stat on the filename fails, it can't be right). |
| 478 | if stat succeeds and the file is a directory,</p><p> |
| 479 | |
| 480 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>path</tt></i> :</span></td><td> the path to check |
| 481 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>2. otherwise returns 1. |
| 482 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlFileMatch"></a>xmlFileMatch ()</h3><pre class="programlisting">int xmlFileMatch (const char *filename);</pre><p> |
| 483 | input from FILE *</p><p> |
| 484 | |
| 485 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>filename</tt></i> :</span></td><td> the URI for matching |
| 486 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>1 if matches, 0 otherwise |
| 487 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlFileOpen"></a>xmlFileOpen ()</h3><pre class="programlisting">void* xmlFileOpen (const char *filename);</pre><p> |
| 488 | Wrapper around xmlFileOpen_real that try it with an unescaped |
| 489 | version of <i><tt>filename</tt></i>, if this fails fallback to <i><tt>filename</tt></i></p><p> |
| 490 | |
| 491 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>filename</tt></i> :</span></td><td> the URI for matching |
| 492 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlFileRead"></a>xmlFileRead ()</h3><pre class="programlisting">int xmlFileRead (void *context, |
| 493 | char *buffer, |
| 494 | int len);</pre><p> |
| 495 | Read <i><tt>len</tt></i> bytes to <i><tt>buffer</tt></i> from the I/O channel.</p><p> |
| 496 | |
| 497 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>context</tt></i> :</span></td><td> the I/O context |
| 498 | </td></tr><tr><td><span class="term"><i><tt>buffer</tt></i> :</span></td><td> where to drop data |
| 499 | </td></tr><tr><td><span class="term"><i><tt>len</tt></i> :</span></td><td> number of bytes to write |
| 500 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the number of bytes written |
| 501 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlFileClose"></a>xmlFileClose ()</h3><pre class="programlisting">int xmlFileClose (void *context);</pre><p> |
| 502 | Close an I/O channel</p><p> |
| 503 | |
| 504 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>context</tt></i> :</span></td><td> the I/O context |
| 505 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>0 or -1 in case of error |
| 506 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlIOHTTPMatch"></a>xmlIOHTTPMatch ()</h3><pre class="programlisting">int xmlIOHTTPMatch (const char *filename);</pre><p> |
| 507 | check if the URI matches an HTTP one</p><p> |
| 508 | |
| 509 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>filename</tt></i> :</span></td><td> the URI for matching |
| 510 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>1 if matches, 0 otherwise |
| 511 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlIOHTTPOpen"></a>xmlIOHTTPOpen ()</h3><pre class="programlisting">void* xmlIOHTTPOpen (const char *filename);</pre><p> |
| 512 | open an HTTP I/O channel</p><p> |
| 513 | |
| 514 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>filename</tt></i> :</span></td><td> the URI for matching |
| 515 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlIOHTTPRead"></a>xmlIOHTTPRead ()</h3><pre class="programlisting">int xmlIOHTTPRead (void *context, |
| 516 | char *buffer, |
| 517 | int len);</pre><p> |
| 518 | Read <i><tt>len</tt></i> bytes to <i><tt>buffer</tt></i> from the I/O channel.</p><p> |
| 519 | |
| 520 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>context</tt></i> :</span></td><td> the I/O context |
| 521 | </td></tr><tr><td><span class="term"><i><tt>buffer</tt></i> :</span></td><td> where to drop data |
| 522 | </td></tr><tr><td><span class="term"><i><tt>len</tt></i> :</span></td><td> number of bytes to write |
| 523 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the number of bytes written |
| 524 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlIOHTTPClose"></a>xmlIOHTTPClose ()</h3><pre class="programlisting">int xmlIOHTTPClose (void *context);</pre><p> |
| 525 | Close an HTTP I/O channel</p><p> |
| 526 | |
| 527 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>context</tt></i> :</span></td><td> the I/O context |
| 528 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>0 |
| 529 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlIOFTPMatch"></a>xmlIOFTPMatch ()</h3><pre class="programlisting">int xmlIOFTPMatch (const char *filename);</pre><p> |
| 530 | check if the URI matches an FTP one</p><p> |
| 531 | |
| 532 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>filename</tt></i> :</span></td><td> the URI for matching |
| 533 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>1 if matches, 0 otherwise |
| 534 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlIOFTPOpen"></a>xmlIOFTPOpen ()</h3><pre class="programlisting">void* xmlIOFTPOpen (const char *filename);</pre><p> |
| 535 | open an FTP I/O channel</p><p> |
| 536 | |
| 537 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>filename</tt></i> :</span></td><td> the URI for matching |
| 538 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlIOFTPRead"></a>xmlIOFTPRead ()</h3><pre class="programlisting">int xmlIOFTPRead (void *context, |
| 539 | char *buffer, |
| 540 | int len);</pre><p> |
| 541 | Read <i><tt>len</tt></i> bytes to <i><tt>buffer</tt></i> from the I/O channel.</p><p> |
| 542 | |
| 543 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>context</tt></i> :</span></td><td> the I/O context |
| 544 | </td></tr><tr><td><span class="term"><i><tt>buffer</tt></i> :</span></td><td> where to drop data |
| 545 | </td></tr><tr><td><span class="term"><i><tt>len</tt></i> :</span></td><td> number of bytes to write |
| 546 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the number of bytes written |
| 547 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlIOFTPClose"></a>xmlIOFTPClose ()</h3><pre class="programlisting">int xmlIOFTPClose (void *context);</pre><p> |
| 548 | Close an FTP I/O channel</p><p> |
| 549 | |
| 550 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>context</tt></i> :</span></td><td> the I/O context |
| 551 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>0 |
| 552 | </td></tr></tbody></table></div></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-nanoftp.html"><b><< nanoftp</b></a></td><td align="right"><a accesskey="n" href="libxml-catalog.html"><b>catalog >></b></a></td></tr></table></body></html> |