VirtualBox

source: vbox/trunk/src/libs/libxml2-2.9.14/doc/devhelp/libxml2-xmlIO.html@ 103285

最後變更 在這個檔案從103285是 95312,由 vboxsync 提交於 2 年 前

libs/{curl,libxml2}: OSE export fixes, bugref:8515

檔案大小: 56.8 KB
 
1<?xml version="1.0" encoding="UTF-8"?>
2<html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
5 <title>xmlIO: interface for the I/O interfaces used by the parser</title>
6 <meta name="generator" content="Libxml2 devhelp stylesheet"/>
7 <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
8 <link rel="up" href="general.html" title="API"/>
9 <link rel="stylesheet" href="style.css" type="text/css"/>
10 <link rel="chapter" href="general.html" title="API"/>
11 </head>
12 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13 <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
14 <tr valign="middle">
15 <td>
16 <a accesskey="p" href="libxml2-xlink.html">
17 <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
18 </a>
19 </td>
20 <td>
21 <a accesskey="u" href="general.html">
22 <img src="up.png" width="24" height="24" border="0" alt="Up"/>
23 </a>
24 </td>
25 <td>
26 <a accesskey="h" href="index.html">
27 <img src="home.png" width="24" height="24" border="0" alt="Home"/>
28 </a>
29 </td>
30 <td>
31 <a accesskey="n" href="libxml2-xmlautomata.html">
32 <img src="right.png" width="24" height="24" border="0" alt="Next"/>
33 </a>
34 </td>
35 <th width="100%" align="center">libxml2 Reference Manual</th>
36 </tr>
37 </table>
38 <h2>
39 <span class="refentrytitle">xmlIO</span>
40 </h2>
41 <p>xmlIO - interface for the I/O interfaces used by the parser</p>
42 <p>interface for the I/O interfaces used by the parser </p>
43 <p>Author(s): Daniel Veillard </p>
44 <div class="refsynopsisdiv">
45 <h2>Synopsis</h2>
46 <pre class="synopsis">int <a href="#xmlIOHTTPRead">xmlIOHTTPRead</a> (void * context, <br/> char * buffer, <br/> int len);
47typedef int <a href="#xmlInputMatchCallback">xmlInputMatchCallback</a> (char const * filename);
48void <a href="#xmlRegisterDefaultOutputCallbacks">xmlRegisterDefaultOutputCallbacks</a> (void);
49int <a href="#xmlFileClose">xmlFileClose</a> (void * context);
50int <a href="#xmlPopOutputCallbacks">xmlPopOutputCallbacks</a> (void);
51typedef int <a href="#xmlOutputMatchCallback">xmlOutputMatchCallback</a> (char const * filename);
52int <a href="#xmlParserInputBufferPush">xmlParserInputBufferPush</a> (<a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> in, <br/> int len, <br/> const char * buf);
53int <a href="#xmlIOFTPRead">xmlIOFTPRead</a> (void * context, <br/> char * buffer, <br/> int len);
54void <a href="#xmlRegisterHTTPPostCallbacks">xmlRegisterHTTPPostCallbacks</a> (void);
55void * <a href="#xmlIOFTPOpen">xmlIOFTPOpen</a> (const char * filename);
56int <a href="#xmlIOFTPClose">xmlIOFTPClose</a> (void * context);
57void * <a href="#xmlFileOpen">xmlFileOpen</a> (const char * filename);
58<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> <a href="#xmlOutputBufferCreateFile">xmlOutputBufferCreateFile</a> (FILE * file, <br/> <a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder);
59int <a href="#xmlCheckFilename">xmlCheckFilename</a> (const char * path);
60typedef void * <a href="#xmlOutputOpenCallback">xmlOutputOpenCallback</a> (char const * filename);
61<a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> <a href="#xmlParserInputBufferCreateFilename">xmlParserInputBufferCreateFilename</a> (const char * URI, <br/> <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc);
62int <a href="#xmlOutputBufferClose">xmlOutputBufferClose</a> (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out);
63<a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> <a href="#xmlAllocParserInputBuffer">xmlAllocParserInputBuffer</a> (<a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc);
64<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> <a href="#xmlOutputBufferCreateIO">xmlOutputBufferCreateIO</a> (<a href="libxml2-xmlIO.html#xmlOutputWriteCallback">xmlOutputWriteCallback</a> iowrite, <br/> <a href="libxml2-xmlIO.html#xmlOutputCloseCallback">xmlOutputCloseCallback</a> ioclose, <br/> void * ioctx, <br/> <a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder);
65typedef int <a href="#xmlOutputWriteCallback">xmlOutputWriteCallback</a> (void * context, <br/> const char * buffer, <br/> int len);
66int <a href="#xmlOutputBufferFlush">xmlOutputBufferFlush</a> (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out);
67<a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> <a href="#xmlCheckHTTPInput">xmlCheckHTTPInput</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> ret);
68int <a href="#xmlRegisterOutputCallbacks">xmlRegisterOutputCallbacks</a> (<a href="libxml2-xmlIO.html#xmlOutputMatchCallback">xmlOutputMatchCallback</a> matchFunc, <br/> <a href="libxml2-xmlIO.html#xmlOutputOpenCallback">xmlOutputOpenCallback</a> openFunc, <br/> <a href="libxml2-xmlIO.html#xmlOutputWriteCallback">xmlOutputWriteCallback</a> writeFunc, <br/> <a href="libxml2-xmlIO.html#xmlOutputCloseCallback">xmlOutputCloseCallback</a> closeFunc);
69<a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> <a href="#xmlParserInputBufferCreateMem">xmlParserInputBufferCreateMem</a> (const char * mem, <br/> int size, <br/> <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc);
70int <a href="#xmlIOFTPMatch">xmlIOFTPMatch</a> (const char * filename);
71int <a href="#xmlRegisterInputCallbacks">xmlRegisterInputCallbacks</a> (<a href="libxml2-xmlIO.html#xmlInputMatchCallback">xmlInputMatchCallback</a> matchFunc, <br/> <a href="libxml2-xmlIO.html#xmlInputOpenCallback">xmlInputOpenCallback</a> openFunc, <br/> <a href="libxml2-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> readFunc, <br/> <a href="libxml2-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> closeFunc);
72void <a href="#xmlFreeParserInputBuffer">xmlFreeParserInputBuffer</a> (<a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> in);
73void <a href="#xmlRegisterDefaultInputCallbacks">xmlRegisterDefaultInputCallbacks</a> (void);
74int <a href="#xmlParserInputBufferGrow">xmlParserInputBufferGrow</a> (<a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> in, <br/> int len);
75typedef int <a href="#xmlOutputCloseCallback">xmlOutputCloseCallback</a> (void * context);
76<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> <a href="#xmlAllocOutputBuffer">xmlAllocOutputBuffer</a> (<a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder);
77<a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> <a href="#xmlNoNetExternalEntityLoader">xmlNoNetExternalEntityLoader</a> (const char * URL, <br/> const char * ID, <br/> <a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
78<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> <a href="#xmlOutputBufferCreateBuffer">xmlOutputBufferCreateBuffer</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buffer, <br/> <a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder);
79int <a href="#xmlIOHTTPMatch">xmlIOHTTPMatch</a> (const char * filename);
80void * <a href="#xmlIOHTTPOpen">xmlIOHTTPOpen</a> (const char * filename);
81<a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> <a href="#xmlParserInputBufferCreateIO">xmlParserInputBufferCreateIO</a> (<a href="libxml2-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> ioread, <br/> <a href="libxml2-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> ioclose, <br/> void * ioctx, <br/> <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc);
82<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> <a href="#xmlOutputBufferCreateFd">xmlOutputBufferCreateFd</a> (int fd, <br/> <a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder);
83<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlNormalizeWindowsPath">xmlNormalizeWindowsPath</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * path);
84typedef int <a href="#xmlInputReadCallback">xmlInputReadCallback</a> (void * context, <br/> char * buffer, <br/> int len);
85<a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> <a href="#xmlParserInputBufferCreateStatic">xmlParserInputBufferCreateStatic</a> (const char * mem, <br/> int size, <br/> <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc);
86const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlOutputBufferGetContent">xmlOutputBufferGetContent</a> (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out);
87int <a href="#xmlIOHTTPClose">xmlIOHTTPClose</a> (void * context);
88int <a href="#xmlOutputBufferWriteEscape">xmlOutputBufferWriteEscape</a> (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br/> <a href="libxml2-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a> escaping);
89<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> <a href="#xmlOutputBufferCreateFilename">xmlOutputBufferCreateFilename</a> (const char * URI, <br/> <a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder, <br/> int compression);
90size_t <a href="#xmlOutputBufferGetSize">xmlOutputBufferGetSize</a> (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out);
91void <a href="#xmlCleanupOutputCallbacks">xmlCleanupOutputCallbacks</a> (void);
92typedef void * <a href="#xmlInputOpenCallback">xmlInputOpenCallback</a> (char const * filename);
93int <a href="#xmlParserInputBufferRead">xmlParserInputBufferRead</a> (<a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> in, <br/> int len);
94int <a href="#xmlOutputBufferWriteString">xmlOutputBufferWriteString</a> (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out, <br/> const char * str);
95int <a href="#xmlFileMatch">xmlFileMatch</a> (const char * filename);
96int <a href="#xmlPopInputCallbacks">xmlPopInputCallbacks</a> (void);
97int <a href="#xmlFileRead">xmlFileRead</a> (void * context, <br/> char * buffer, <br/> int len);
98<a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> <a href="#xmlParserInputBufferCreateFile">xmlParserInputBufferCreateFile</a> (FILE * file, <br/> <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc);
99char * <a href="#xmlParserGetDirectory">xmlParserGetDirectory</a> (const char * filename);
100int <a href="#xmlOutputBufferWrite">xmlOutputBufferWrite</a> (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out, <br/> int len, <br/> const char * buf);
101void <a href="#xmlCleanupInputCallbacks">xmlCleanupInputCallbacks</a> (void);
102typedef int <a href="#xmlInputCloseCallback">xmlInputCloseCallback</a> (void * context);
103void * <a href="#xmlIOHTTPOpenW">xmlIOHTTPOpenW</a> (const char * post_uri, <br/> int compression);
104<a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> <a href="#xmlParserInputBufferCreateFd">xmlParserInputBufferCreateFd</a> (int fd, <br/> <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc);
105</pre>
106 </div>
107 <div class="refsect1" lang="en">
108 <h2>Description</h2>
109 </div>
110 <div class="refsect1" lang="en">
111 <h2>Details</h2>
112 <div class="refsect2" lang="en">
113 <div class="refsect2" lang="en"><h3><a name="xmlInputCloseCallback"/>Function type xmlInputCloseCallback</h3><pre class="programlisting">int xmlInputCloseCallback (void * context)<br/>
114</pre><p>Callback used in the I/O Input API to close the resource</p>
115<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>context</tt></i>:</span></td><td>an Input context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 or -1 in case of error</td></tr></tbody></table></div></div>
116 <hr/>
117 <div class="refsect2" lang="en"><h3><a name="xmlInputMatchCallback"/>Function type xmlInputMatchCallback</h3><pre class="programlisting">int xmlInputMatchCallback (char const * filename)<br/>
118</pre><p>Callback used in the I/O Input API to detect if the current handler can provide input functionality for this resource.</p>
119<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename or URI</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if yes and 0 if another Input module should be used</td></tr></tbody></table></div></div>
120 <hr/>
121 <div class="refsect2" lang="en"><h3><a name="xmlInputOpenCallback"/>Function type xmlInputOpenCallback</h3><pre class="programlisting">void * xmlInputOpenCallback (char const * filename)<br/>
122</pre><p>Callback used in the I/O Input API to open the resource</p>
123<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename or URI</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an Input context or NULL in case or error</td></tr></tbody></table></div></div>
124 <hr/>
125 <div class="refsect2" lang="en"><h3><a name="xmlInputReadCallback"/>Function type xmlInputReadCallback</h3><pre class="programlisting">int xmlInputReadCallback (void * context, <br/> char * buffer, <br/> int len)<br/>
126</pre><p>Callback used in the I/O Input API to read the resource</p>
127<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>context</tt></i>:</span></td><td>an Input context</td></tr><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>the buffer to store data read</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the length of the buffer in bytes</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes read or -1 in case of error</td></tr></tbody></table></div></div>
128 <hr/>
129 <div class="refsect2" lang="en"><h3><a name="xmlOutputCloseCallback"/>Function type xmlOutputCloseCallback</h3><pre class="programlisting">int xmlOutputCloseCallback (void * context)<br/>
130</pre><p>Callback used in the I/O Output API to close the resource</p>
131<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>context</tt></i>:</span></td><td>an Output context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 or -1 in case of error</td></tr></tbody></table></div></div>
132 <hr/>
133 <div class="refsect2" lang="en"><h3><a name="xmlOutputMatchCallback"/>Function type xmlOutputMatchCallback</h3><pre class="programlisting">int xmlOutputMatchCallback (char const * filename)<br/>
134</pre><p>Callback used in the I/O Output API to detect if the current handler can provide output functionality for this resource.</p>
135<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename or URI</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if yes and 0 if another Output module should be used</td></tr></tbody></table></div></div>
136 <hr/>
137 <div class="refsect2" lang="en"><h3><a name="xmlOutputOpenCallback"/>Function type xmlOutputOpenCallback</h3><pre class="programlisting">void * xmlOutputOpenCallback (char const * filename)<br/>
138</pre><p>Callback used in the I/O Output API to open the resource</p>
139<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename or URI</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an Output context or NULL in case or error</td></tr></tbody></table></div></div>
140 <hr/>
141 <div class="refsect2" lang="en"><h3><a name="xmlOutputWriteCallback"/>Function type xmlOutputWriteCallback</h3><pre class="programlisting">int xmlOutputWriteCallback (void * context, <br/> const char * buffer, <br/> int len)<br/>
142</pre><p>Callback used in the I/O Output API to write to the resource</p>
143<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>context</tt></i>:</span></td><td>an Output context</td></tr><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>the buffer of data to write</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the length of the buffer in bytes</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written or -1 in case of error</td></tr></tbody></table></div></div>
144 <hr/>
145 <div class="refsect2" lang="en"><h3><a name="xmlAllocOutputBuffer"/>xmlAllocOutputBuffer ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> xmlAllocOutputBuffer (<a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder)<br/>
146</pre><p>Create a buffered parser output</p>
147<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>encoder</tt></i>:</span></td><td>the encoding converter or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser output or NULL</td></tr></tbody></table></div></div>
148 <hr/>
149 <div class="refsect2" lang="en"><h3><a name="xmlAllocParserInputBuffer"/>xmlAllocParserInputBuffer ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> xmlAllocParserInputBuffer (<a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)<br/>
150</pre><p>Create a buffered parser input for progressive parsing</p>
151<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>enc</tt></i>:</span></td><td>the charset encoding if known</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser input or NULL</td></tr></tbody></table></div></div>
152 <hr/>
153 <div class="refsect2" lang="en"><h3><a name="xmlCheckFilename"/>xmlCheckFilename ()</h3><pre class="programlisting">int xmlCheckFilename (const char * path)<br/>
154</pre><p>function checks to see if @path is a valid source (file, socket...) for XML. if stat is not available on the target machine,</p>
155<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>path</tt></i>:</span></td><td>the path to check</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1. if stat fails, returns 0 (if calling stat on the filename fails, it can't be right). if stat succeeds and the file is a directory, returns 2. otherwise returns 1.</td></tr></tbody></table></div></div>
156 <hr/>
157 <div class="refsect2" lang="en"><h3><a name="xmlCheckHTTPInput"/>xmlCheckHTTPInput ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> xmlCheckHTTPInput (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> ret)<br/>
158</pre><p>Check an input in case it was created from an HTTP stream, in that case it will handle encoding and update of the base URL in case of redirection. It also checks for HTTP errors in which case the input is cleanly freed up and an appropriate error is raised in context</p>
159<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>ret</tt></i>:</span></td><td>an XML parser input</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the input or NULL in case of HTTP error.</td></tr></tbody></table></div></div>
160 <hr/>
161 <div class="refsect2" lang="en"><h3><a name="xmlCleanupInputCallbacks"/>xmlCleanupInputCallbacks ()</h3><pre class="programlisting">void xmlCleanupInputCallbacks (void)<br/>
162</pre><p>clears the entire input callback table. this includes the compiled-in I/O.</p>
163</div>
164 <hr/>
165 <div class="refsect2" lang="en"><h3><a name="xmlCleanupOutputCallbacks"/>xmlCleanupOutputCallbacks ()</h3><pre class="programlisting">void xmlCleanupOutputCallbacks (void)<br/>
166</pre><p>clears the entire output callback table. this includes the compiled-in I/O callbacks.</p>
167</div>
168 <hr/>
169 <div class="refsect2" lang="en"><h3><a name="xmlFileClose"/>xmlFileClose ()</h3><pre class="programlisting">int xmlFileClose (void * context)<br/>
170</pre><p>Close an I/O channel</p>
171<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>context</tt></i>:</span></td><td>the I/O context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 or -1 in case of error</td></tr></tbody></table></div></div>
172 <hr/>
173 <div class="refsect2" lang="en"><h3><a name="xmlFileMatch"/>xmlFileMatch ()</h3><pre class="programlisting">int xmlFileMatch (const char * filename)<br/>
174</pre><p>input from FILE *</p>
175<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the URI for matching</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if matches, 0 otherwise</td></tr></tbody></table></div></div>
176 <hr/>
177 <div class="refsect2" lang="en"><h3><a name="xmlFileOpen"/>xmlFileOpen ()</h3><pre class="programlisting">void * xmlFileOpen (const char * filename)<br/>
178</pre><p>Wrapper around xmlFileOpen_real that try it with an unescaped version of @filename, if this fails fallback to @filename</p>
179<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the URI for matching</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a handler or NULL in case or failure</td></tr></tbody></table></div></div>
180 <hr/>
181 <div class="refsect2" lang="en"><h3><a name="xmlFileRead"/>xmlFileRead ()</h3><pre class="programlisting">int xmlFileRead (void * context, <br/> char * buffer, <br/> int len)<br/>
182</pre><p>Read @len bytes to @buffer from the I/O channel.</p>
183<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>context</tt></i>:</span></td><td>the I/O context</td></tr><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>where to drop data</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>number of bytes to write</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written or &lt; 0 in case of failure</td></tr></tbody></table></div></div>
184 <hr/>
185 <div class="refsect2" lang="en"><h3><a name="xmlFreeParserInputBuffer"/>xmlFreeParserInputBuffer ()</h3><pre class="programlisting">void xmlFreeParserInputBuffer (<a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> in)<br/>
186</pre><p>Free up the memory used by a buffered parser input</p>
187<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>in</tt></i>:</span></td><td>a buffered parser input</td></tr></tbody></table></div></div>
188 <hr/>
189 <div class="refsect2" lang="en"><h3><a name="xmlIOFTPClose"/>xmlIOFTPClose ()</h3><pre class="programlisting">int xmlIOFTPClose (void * context)<br/>
190</pre><p>Close an FTP I/O channel</p>
191<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>context</tt></i>:</span></td><td>the I/O context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0</td></tr></tbody></table></div></div>
192 <hr/>
193 <div class="refsect2" lang="en"><h3><a name="xmlIOFTPMatch"/>xmlIOFTPMatch ()</h3><pre class="programlisting">int xmlIOFTPMatch (const char * filename)<br/>
194</pre><p>check if the URI matches an FTP one</p>
195<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the URI for matching</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if matches, 0 otherwise</td></tr></tbody></table></div></div>
196 <hr/>
197 <div class="refsect2" lang="en"><h3><a name="xmlIOFTPOpen"/>xmlIOFTPOpen ()</h3><pre class="programlisting">void * xmlIOFTPOpen (const char * filename)<br/>
198</pre><p>open an FTP I/O channel</p>
199<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the URI for matching</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an I/O context or NULL in case of error</td></tr></tbody></table></div></div>
200 <hr/>
201 <div class="refsect2" lang="en"><h3><a name="xmlIOFTPRead"/>xmlIOFTPRead ()</h3><pre class="programlisting">int xmlIOFTPRead (void * context, <br/> char * buffer, <br/> int len)<br/>
202</pre><p>Read @len bytes to @buffer from the I/O channel.</p>
203<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>context</tt></i>:</span></td><td>the I/O context</td></tr><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>where to drop data</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>number of bytes to write</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written</td></tr></tbody></table></div></div>
204 <hr/>
205 <div class="refsect2" lang="en"><h3><a name="xmlIOHTTPClose"/>xmlIOHTTPClose ()</h3><pre class="programlisting">int xmlIOHTTPClose (void * context)<br/>
206</pre><p>Close an HTTP I/O channel</p>
207<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>context</tt></i>:</span></td><td>the I/O context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0</td></tr></tbody></table></div></div>
208 <hr/>
209 <div class="refsect2" lang="en"><h3><a name="xmlIOHTTPMatch"/>xmlIOHTTPMatch ()</h3><pre class="programlisting">int xmlIOHTTPMatch (const char * filename)<br/>
210</pre><p>check if the URI matches an HTTP one</p>
211<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the URI for matching</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if matches, 0 otherwise</td></tr></tbody></table></div></div>
212 <hr/>
213 <div class="refsect2" lang="en"><h3><a name="xmlIOHTTPOpen"/>xmlIOHTTPOpen ()</h3><pre class="programlisting">void * xmlIOHTTPOpen (const char * filename)<br/>
214</pre><p>open an HTTP I/O channel</p>
215<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the URI for matching</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an I/O context or NULL in case of error</td></tr></tbody></table></div></div>
216 <hr/>
217 <div class="refsect2" lang="en"><h3><a name="xmlIOHTTPOpenW"/>xmlIOHTTPOpenW ()</h3><pre class="programlisting">void * xmlIOHTTPOpenW (const char * post_uri, <br/> int compression)<br/>
218</pre><p>Open a temporary buffer to collect the document for a subsequent HTTP POST request. Non-static as is called from the output buffer creation routine.</p>
219<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>post_uri</tt></i>:</span></td><td>The destination URI for the document</td></tr><tr><td><span class="term"><i><tt>compression</tt></i>:</span></td><td>The compression desired for the document.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an I/O context or NULL in case of error.</td></tr></tbody></table></div></div>
220 <hr/>
221 <div class="refsect2" lang="en"><h3><a name="xmlIOHTTPRead"/>xmlIOHTTPRead ()</h3><pre class="programlisting">int xmlIOHTTPRead (void * context, <br/> char * buffer, <br/> int len)<br/>
222</pre><p>Read @len bytes to @buffer from the I/O channel.</p>
223<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>context</tt></i>:</span></td><td>the I/O context</td></tr><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>where to drop data</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>number of bytes to write</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written</td></tr></tbody></table></div></div>
224 <hr/>
225 <div class="refsect2" lang="en"><h3><a name="xmlNoNetExternalEntityLoader"/>xmlNoNetExternalEntityLoader ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> xmlNoNetExternalEntityLoader (const char * URL, <br/> const char * ID, <br/> <a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
226</pre><p>A specific entity loader disabling network accesses, though still allowing local catalog accesses for resolution.</p>
227<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the URL for the entity to load</td></tr><tr><td><span class="term"><i><tt>ID</tt></i>:</span></td><td>the System ID for the entity to load</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</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new allocated xmlParserInputPtr, or NULL.</td></tr></tbody></table></div></div>
228 <hr/>
229 <div class="refsect2" lang="en"><h3><a name="xmlNormalizeWindowsPath"/>xmlNormalizeWindowsPath ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlNormalizeWindowsPath (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * path)<br/>
230</pre><p>This function is obsolete. Please see xmlURIFromPath in uri.c for a better solution.</p>
231<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>path</tt></i>:</span></td><td>the input file path</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a canonicalized version of the path</td></tr></tbody></table></div></div>
232 <hr/>
233 <div class="refsect2" lang="en"><h3><a name="xmlOutputBufferClose"/>xmlOutputBufferClose ()</h3><pre class="programlisting">int xmlOutputBufferClose (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out)<br/>
234</pre><p>flushes and close the output I/O channel and free up all the associated resources</p>
235<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>a buffered output</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte written or -1 in case of error.</td></tr></tbody></table></div></div>
236 <hr/>
237 <div class="refsect2" lang="en"><h3><a name="xmlOutputBufferCreateBuffer"/>xmlOutputBufferCreateBuffer ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> xmlOutputBufferCreateBuffer (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buffer, <br/> <a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder)<br/>
238</pre><p>Create a buffered output for the progressive saving to a <a href="libxml2-tree.html#xmlBuffer">xmlBuffer</a></p>
239<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>a <a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a></td></tr><tr><td><span class="term"><i><tt>encoder</tt></i>:</span></td><td>the encoding converter or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser output or NULL</td></tr></tbody></table></div></div>
240 <hr/>
241 <div class="refsect2" lang="en"><h3><a name="xmlOutputBufferCreateFd"/>xmlOutputBufferCreateFd ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> xmlOutputBufferCreateFd (int fd, <br/> <a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder)<br/>
242</pre><p>Create a buffered output for the progressive saving to a file descriptor</p>
243<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>fd</tt></i>:</span></td><td>a file descriptor number</td></tr><tr><td><span class="term"><i><tt>encoder</tt></i>:</span></td><td>the encoding converter or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser output or NULL</td></tr></tbody></table></div></div>
244 <hr/>
245 <div class="refsect2" lang="en"><h3><a name="xmlOutputBufferCreateFile"/>xmlOutputBufferCreateFile ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> xmlOutputBufferCreateFile (FILE * file, <br/> <a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder)<br/>
246</pre><p>Create a buffered output for the progressive saving to a FILE * buffered C I/O</p>
247<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>file</tt></i>:</span></td><td>a FILE*</td></tr><tr><td><span class="term"><i><tt>encoder</tt></i>:</span></td><td>the encoding converter or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser output or NULL</td></tr></tbody></table></div></div>
248 <hr/>
249 <div class="refsect2" lang="en"><h3><a name="xmlOutputBufferCreateFilename"/>xmlOutputBufferCreateFilename ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> xmlOutputBufferCreateFilename (const char * URI, <br/> <a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder, <br/> int compression)<br/>
250</pre><p>Create a buffered output for the progressive saving of a file If filename is "-' then we use stdout as the output. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. TODO: currently if compression is set, the library only support writing to a local file.</p>
251<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>URI</tt></i>:</span></td><td>a C string containing the URI or filename</td></tr><tr><td><span class="term"><i><tt>encoder</tt></i>:</span></td><td>the encoding converter or NULL</td></tr><tr><td><span class="term"><i><tt>compression</tt></i>:</span></td><td>the compression ration (0 none, 9 max).</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new output or NULL</td></tr></tbody></table></div></div>
252 <hr/>
253 <div class="refsect2" lang="en"><h3><a name="xmlOutputBufferCreateIO"/>xmlOutputBufferCreateIO ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> xmlOutputBufferCreateIO (<a href="libxml2-xmlIO.html#xmlOutputWriteCallback">xmlOutputWriteCallback</a> iowrite, <br/> <a href="libxml2-xmlIO.html#xmlOutputCloseCallback">xmlOutputCloseCallback</a> ioclose, <br/> void * ioctx, <br/> <a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder)<br/>
254</pre><p>Create a buffered output for the progressive saving to an I/O handler</p>
255<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>iowrite</tt></i>:</span></td><td>an I/O write function</td></tr><tr><td><span class="term"><i><tt>ioclose</tt></i>:</span></td><td>an I/O close function</td></tr><tr><td><span class="term"><i><tt>ioctx</tt></i>:</span></td><td>an I/O handler</td></tr><tr><td><span class="term"><i><tt>encoder</tt></i>:</span></td><td>the charset encoding if known</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser output or NULL</td></tr></tbody></table></div></div>
256 <hr/>
257 <div class="refsect2" lang="en"><h3><a name="xmlOutputBufferFlush"/>xmlOutputBufferFlush ()</h3><pre class="programlisting">int xmlOutputBufferFlush (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out)<br/>
258</pre><p>flushes the output I/O channel</p>
259<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>a buffered output</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte written or -1 in case of error.</td></tr></tbody></table></div></div>
260 <hr/>
261 <div class="refsect2" lang="en"><h3><a name="xmlOutputBufferGetContent"/>xmlOutputBufferGetContent ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlOutputBufferGetContent (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out)<br/>
262</pre><p>Gives a pointer to the data currently held in the output buffer</p>
263<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>an <a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the data or NULL in case of error</td></tr></tbody></table></div></div>
264 <hr/>
265 <div class="refsect2" lang="en"><h3><a name="xmlOutputBufferGetSize"/>xmlOutputBufferGetSize ()</h3><pre class="programlisting">size_t xmlOutputBufferGetSize (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out)<br/>
266</pre><p>Gives the length of the data currently held in the output buffer</p>
267<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>an <a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case or error or no data is held, the size otherwise</td></tr></tbody></table></div></div>
268 <hr/>
269 <div class="refsect2" lang="en"><h3><a name="xmlOutputBufferWrite"/>xmlOutputBufferWrite ()</h3><pre class="programlisting">int xmlOutputBufferWrite (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out, <br/> int len, <br/> const char * buf)<br/>
270</pre><p>Write the content of the array in the output I/O buffer This routine handle the I18N transcoding from internal UTF-8 The buffer is lossless, i.e. will store in case of partial or delayed writes.</p>
271<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>a buffered parser output</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the size in bytes of the array.</td></tr><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>an char array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of chars immediately written, or -1 in case of error.</td></tr></tbody></table></div></div>
272 <hr/>
273 <div class="refsect2" lang="en"><h3><a name="xmlOutputBufferWriteEscape"/>xmlOutputBufferWriteEscape ()</h3><pre class="programlisting">int xmlOutputBufferWriteEscape (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br/> <a href="libxml2-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a> escaping)<br/>
274</pre><p>Write the content of the string in the output I/O buffer This routine escapes the <a href="libxml2-SAX.html#characters">characters</a> and then handle the I18N transcoding from internal UTF-8 The buffer is lossless, i.e. will store in case of partial or delayed writes.</p>
275<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>a buffered parser output</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>a zero terminated UTF-8 string</td></tr><tr><td><span class="term"><i><tt>escaping</tt></i>:</span></td><td>an optional escaping function (or NULL)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of chars immediately written, or -1 in case of error.</td></tr></tbody></table></div></div>
276 <hr/>
277 <div class="refsect2" lang="en"><h3><a name="xmlOutputBufferWriteString"/>xmlOutputBufferWriteString ()</h3><pre class="programlisting">int xmlOutputBufferWriteString (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out, <br/> const char * str)<br/>
278</pre><p>Write the content of the string in the output I/O buffer This routine handle the I18N transcoding from internal UTF-8 The buffer is lossless, i.e. will store in case of partial or delayed writes.</p>
279<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>a buffered parser output</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>a zero terminated C string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of chars immediately written, or -1 in case of error.</td></tr></tbody></table></div></div>
280 <hr/>
281 <div class="refsect2" lang="en"><h3><a name="xmlParserGetDirectory"/>xmlParserGetDirectory ()</h3><pre class="programlisting">char * xmlParserGetDirectory (const char * filename)<br/>
282</pre><p>lookup the directory for that file</p>
283<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the path to a file</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new allocated string containing the directory, or NULL.</td></tr></tbody></table></div></div>
284 <hr/>
285 <div class="refsect2" lang="en"><h3><a name="xmlParserInputBufferCreateFd"/>xmlParserInputBufferCreateFd ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> xmlParserInputBufferCreateFd (int fd, <br/> <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)<br/>
286</pre><p>Create a buffered parser input for the progressive parsing for the input from a file descriptor</p>
287<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>fd</tt></i>:</span></td><td>a file descriptor number</td></tr><tr><td><span class="term"><i><tt>enc</tt></i>:</span></td><td>the charset encoding if known</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser input or NULL</td></tr></tbody></table></div></div>
288 <hr/>
289 <div class="refsect2" lang="en"><h3><a name="xmlParserInputBufferCreateFile"/>xmlParserInputBufferCreateFile ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> xmlParserInputBufferCreateFile (FILE * file, <br/> <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)<br/>
290</pre><p>Create a buffered parser input for the progressive parsing of a FILE * buffered C I/O</p>
291<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>file</tt></i>:</span></td><td>a FILE*</td></tr><tr><td><span class="term"><i><tt>enc</tt></i>:</span></td><td>the charset encoding if known</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser input or NULL</td></tr></tbody></table></div></div>
292 <hr/>
293 <div class="refsect2" lang="en"><h3><a name="xmlParserInputBufferCreateFilename"/>xmlParserInputBufferCreateFilename ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> xmlParserInputBufferCreateFilename (const char * URI, <br/> <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)<br/>
294</pre><p>Create a buffered parser input for the progressive parsing of a file If filename is "-' then we use stdin as the input. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. Do an encoding check if enc == <a href="libxml2-encoding.html#XML_CHAR_ENCODING_NONE">XML_CHAR_ENCODING_NONE</a></p>
295<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>URI</tt></i>:</span></td><td>a C string containing the URI or filename</td></tr><tr><td><span class="term"><i><tt>enc</tt></i>:</span></td><td>the charset encoding if known</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser input or NULL</td></tr></tbody></table></div></div>
296 <hr/>
297 <div class="refsect2" lang="en"><h3><a name="xmlParserInputBufferCreateIO"/>xmlParserInputBufferCreateIO ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> xmlParserInputBufferCreateIO (<a href="libxml2-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> ioread, <br/> <a href="libxml2-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> ioclose, <br/> void * ioctx, <br/> <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)<br/>
298</pre><p>Create a buffered parser input for the progressive parsing for the input from an I/O handler</p>
299<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ioread</tt></i>:</span></td><td>an I/O read function</td></tr><tr><td><span class="term"><i><tt>ioclose</tt></i>:</span></td><td>an I/O close function</td></tr><tr><td><span class="term"><i><tt>ioctx</tt></i>:</span></td><td>an I/O handler</td></tr><tr><td><span class="term"><i><tt>enc</tt></i>:</span></td><td>the charset encoding if known</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser input or NULL</td></tr></tbody></table></div></div>
300 <hr/>
301 <div class="refsect2" lang="en"><h3><a name="xmlParserInputBufferCreateMem"/>xmlParserInputBufferCreateMem ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> xmlParserInputBufferCreateMem (const char * mem, <br/> int size, <br/> <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)<br/>
302</pre><p>Create a buffered parser input for the progressive parsing for the input from a memory area.</p>
303<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>mem</tt></i>:</span></td><td>the memory input</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the length of the memory block</td></tr><tr><td><span class="term"><i><tt>enc</tt></i>:</span></td><td>the charset encoding if known</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser input or NULL</td></tr></tbody></table></div></div>
304 <hr/>
305 <div class="refsect2" lang="en"><h3><a name="xmlParserInputBufferCreateStatic"/>xmlParserInputBufferCreateStatic ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> xmlParserInputBufferCreateStatic (const char * mem, <br/> int size, <br/> <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)<br/>
306</pre><p>Create a buffered parser input for the progressive parsing for the input from an immutable memory area. This will not copy the memory area to the buffer, but the memory is expected to be available until the end of the parsing, this is useful for example when using mmap'ed file.</p>
307<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>mem</tt></i>:</span></td><td>the memory input</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the length of the memory block</td></tr><tr><td><span class="term"><i><tt>enc</tt></i>:</span></td><td>the charset encoding if known</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser input or NULL</td></tr></tbody></table></div></div>
308 <hr/>
309 <div class="refsect2" lang="en"><h3><a name="xmlParserInputBufferGrow"/>xmlParserInputBufferGrow ()</h3><pre class="programlisting">int xmlParserInputBufferGrow (<a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> in, <br/> int len)<br/>
310</pre><p>Grow up the content of the input buffer, the old data are preserved This routine handle the I18N transcoding to internal UTF-8 This routine is used when operating the parser in normal (pull) mode TODO: one should be able to remove one extra copy by copying directly onto in-&gt;buffer or in-&gt;raw</p>
311<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>in</tt></i>:</span></td><td>a buffered parser input</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>indicative value of the amount of chars to read</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of chars read and stored in the buffer, or -1 in case of error.</td></tr></tbody></table></div></div>
312 <hr/>
313 <div class="refsect2" lang="en"><h3><a name="xmlParserInputBufferPush"/>xmlParserInputBufferPush ()</h3><pre class="programlisting">int xmlParserInputBufferPush (<a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> in, <br/> int len, <br/> const char * buf)<br/>
314</pre><p>Push the content of the arry in the input buffer This routine handle the I18N transcoding to internal UTF-8 This is used when operating the parser in progressive (push) mode.</p>
315<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>in</tt></i>:</span></td><td>a buffered parser input</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the size in bytes of the array.</td></tr><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>an char array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of chars read and stored in the buffer, or -1 in case of error.</td></tr></tbody></table></div></div>
316 <hr/>
317 <div class="refsect2" lang="en"><h3><a name="xmlParserInputBufferRead"/>xmlParserInputBufferRead ()</h3><pre class="programlisting">int xmlParserInputBufferRead (<a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> in, <br/> int len)<br/>
318</pre><p>Refresh the content of the input buffer, the old data are considered consumed This routine handle the I18N transcoding to internal UTF-8</p>
319<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>in</tt></i>:</span></td><td>a buffered parser input</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>indicative value of the amount of chars to read</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of chars read and stored in the buffer, or -1 in case of error.</td></tr></tbody></table></div></div>
320 <hr/>
321 <div class="refsect2" lang="en"><h3><a name="xmlPopInputCallbacks"/>xmlPopInputCallbacks ()</h3><pre class="programlisting">int xmlPopInputCallbacks (void)<br/>
322</pre><p>Clear the top input callback from the input stack. this includes the compiled-in I/O.</p>
323<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of input callback registered or -1 in case of error.</td></tr></tbody></table></div></div>
324 <hr/>
325 <div class="refsect2" lang="en"><h3><a name="xmlPopOutputCallbacks"/>xmlPopOutputCallbacks ()</h3><pre class="programlisting">int xmlPopOutputCallbacks (void)<br/>
326</pre><p>Remove the top output callbacks from the output stack. This includes the compiled-in I/O.</p>
327<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of output callback registered or -1 in case of error.</td></tr></tbody></table></div></div>
328 <hr/>
329 <div class="refsect2" lang="en"><h3><a name="xmlRegisterDefaultInputCallbacks"/>xmlRegisterDefaultInputCallbacks ()</h3><pre class="programlisting">void xmlRegisterDefaultInputCallbacks (void)<br/>
330</pre><p>Registers the default compiled-in I/O handlers.</p>
331</div>
332 <hr/>
333 <div class="refsect2" lang="en"><h3><a name="xmlRegisterDefaultOutputCallbacks"/>xmlRegisterDefaultOutputCallbacks ()</h3><pre class="programlisting">void xmlRegisterDefaultOutputCallbacks (void)<br/>
334</pre><p>Registers the default compiled-in I/O handlers.</p>
335</div>
336 <hr/>
337 <div class="refsect2" lang="en"><h3><a name="xmlRegisterHTTPPostCallbacks"/>xmlRegisterHTTPPostCallbacks ()</h3><pre class="programlisting">void xmlRegisterHTTPPostCallbacks (void)<br/>
338</pre><p>By default, libxml submits HTTP output requests using the "PUT" method. Calling this method changes the HTTP output method to use the "POST" method instead.</p>
339</div>
340 <hr/>
341 <div class="refsect2" lang="en"><h3><a name="xmlRegisterInputCallbacks"/>xmlRegisterInputCallbacks ()</h3><pre class="programlisting">int xmlRegisterInputCallbacks (<a href="libxml2-xmlIO.html#xmlInputMatchCallback">xmlInputMatchCallback</a> matchFunc, <br/> <a href="libxml2-xmlIO.html#xmlInputOpenCallback">xmlInputOpenCallback</a> openFunc, <br/> <a href="libxml2-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> readFunc, <br/> <a href="libxml2-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> closeFunc)<br/>
342</pre><p>Register a new set of I/O callback for handling parser input.</p>
343<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>matchFunc</tt></i>:</span></td><td>the <a href="libxml2-xmlIO.html#xmlInputMatchCallback">xmlInputMatchCallback</a></td></tr><tr><td><span class="term"><i><tt>openFunc</tt></i>:</span></td><td>the <a href="libxml2-xmlIO.html#xmlInputOpenCallback">xmlInputOpenCallback</a></td></tr><tr><td><span class="term"><i><tt>readFunc</tt></i>:</span></td><td>the <a href="libxml2-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a></td></tr><tr><td><span class="term"><i><tt>closeFunc</tt></i>:</span></td><td>the <a href="libxml2-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the registered handler number or -1 in case of error</td></tr></tbody></table></div></div>
344 <hr/>
345 <div class="refsect2" lang="en"><h3><a name="xmlRegisterOutputCallbacks"/>xmlRegisterOutputCallbacks ()</h3><pre class="programlisting">int xmlRegisterOutputCallbacks (<a href="libxml2-xmlIO.html#xmlOutputMatchCallback">xmlOutputMatchCallback</a> matchFunc, <br/> <a href="libxml2-xmlIO.html#xmlOutputOpenCallback">xmlOutputOpenCallback</a> openFunc, <br/> <a href="libxml2-xmlIO.html#xmlOutputWriteCallback">xmlOutputWriteCallback</a> writeFunc, <br/> <a href="libxml2-xmlIO.html#xmlOutputCloseCallback">xmlOutputCloseCallback</a> closeFunc)<br/>
346</pre><p>Register a new set of I/O callback for handling output.</p>
347<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>matchFunc</tt></i>:</span></td><td>the <a href="libxml2-xmlIO.html#xmlOutputMatchCallback">xmlOutputMatchCallback</a></td></tr><tr><td><span class="term"><i><tt>openFunc</tt></i>:</span></td><td>the <a href="libxml2-xmlIO.html#xmlOutputOpenCallback">xmlOutputOpenCallback</a></td></tr><tr><td><span class="term"><i><tt>writeFunc</tt></i>:</span></td><td>the <a href="libxml2-xmlIO.html#xmlOutputWriteCallback">xmlOutputWriteCallback</a></td></tr><tr><td><span class="term"><i><tt>closeFunc</tt></i>:</span></td><td>the <a href="libxml2-xmlIO.html#xmlOutputCloseCallback">xmlOutputCloseCallback</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the registered handler number or -1 in case of error</td></tr></tbody></table></div></div>
348 <hr/>
349 </div>
350 </div>
351 </body>
352</html>
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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