blob: 42f661d5339945cf13ff85c41ba36b6764309e21 [file] [log] [blame]
Daniel Veillard9589d452002-02-02 10:28:17 +00001<?xml version="1.0" encoding="ISO-8859-1"?>
2<api name='libxml2-python'>
Daniel Veillard9589d452002-02-02 10:28:17 +00003 <symbols>
4 <function name='xmlRegisterXPathFunction' file='python'>
Daniel Veillard95175012005-07-03 16:09:51 +00005 <cond>defined(LIBXML_XPATH_ENABLED)</cond>
Daniel Veillard9589d452002-02-02 10:28:17 +00006 <info>Register a Python written function to the XPath interpreter</info>
7 <return type='int' info="1 in case of success, 0 or -1 in case of error"/>
8 <arg name='ctx' type='xmlXPathContextPtr' info='the xpathContext'/>
9 <arg name='name' type='xmlChar *' info='the function name'/>
10 <arg name='ns_uri' type='xmlChar *' info='the namespace or NULL'/>
11 <arg name='f' type='pythonObject' info='the python function'/>
12 </function>
Daniel Veillarda94ec6f2002-03-01 13:00:53 +000013 <function name='xmlNewNode' file='python'>
14 <info>Create a new Node</info>
15 <return type='xmlNodePtr' info="A new element node"/>
16 <arg name='name' type='xmlChar *' info='the node name'/>
17 </function>
Daniel Veillard3ce52572002-02-03 15:08:05 +000018 <function name='xmlCreatePushParser' file='python'>
Daniel Veillard4e1b26c2002-02-03 20:13:06 +000019 <info>Create a progressive XML parser context to build either an event flow if the SAX object is not None, or a DOM tree otherwise.</info>
20 <return type='xmlParserCtxtPtr' info="the parser context or None in case of error"/>
21 <arg name='SAX' type='pythonObject' info='the SAX callback object or None'/>
22 <arg name='chunk' type='xmlChar *' info='the initial data'/>
23 <arg name='size' type='int' info='the size of the initial data'/>
24 <arg name='URI' type='xmlChar *' info='The URI used for base computations'/>
25 </function>
26 <function name='htmlCreatePushParser' file='python'>
Daniel Veillard95175012005-07-03 16:09:51 +000027 <cond>defined(LIBXML_HTML_ENABLED)</cond>
Daniel Veillard4e1b26c2002-02-03 20:13:06 +000028 <info>Create a progressive HTML parser context to build either an event flow if the SAX object is not None, or a DOM tree otherwise.</info>
Daniel Veillard3ce52572002-02-03 15:08:05 +000029 <return type='xmlParserCtxtPtr' info="the parser context or None in case of error"/>
30 <arg name='SAX' type='pythonObject' info='the SAX callback object or None'/>
31 <arg name='chunk' type='xmlChar *' info='the initial data'/>
32 <arg name='size' type='int' info='the size of the initial data'/>
33 <arg name='URI' type='xmlChar *' info='The URI used for base computations'/>
34 </function>
Daniel Veillard8d24cc12002-03-05 15:41:29 +000035 <function name='xmlSAXParseFile' file='python'>
36 <info>Interface to parse an XML file or resource pointed by an URI to build an event flow to the SAX object</info>
37 <return type='void'/>
38 <arg name='SAX' type='pythonObject' info='the SAX callback object or None'/>
39 <arg name='URI' type='xmlChar *' info='The URI of the resource'/>
40 <arg name='recover' type='int' info='allow recovery in case of error'/>
41 </function>
42 <function name='htmlSAXParseFile' file='python'>
Daniel Veillard95175012005-07-03 16:09:51 +000043 <cond>defined(LIBXML_HTML_ENABLED)</cond>
Daniel Veillard8d24cc12002-03-05 15:41:29 +000044 <info>Interface to parse an HTML file or resource pointed by an URI to build an event flow to the SAX object</info>
45 <return type='void'/>
46 <arg name='SAX' type='pythonObject' info='the SAX callback object or None'/>
47 <arg name='URI' type='xmlChar *' info='The URI of the resource'/>
48 <arg name='encoding' type='const char *' info='encoding or None'/>
49 </function>
Daniel Veillardc6d4a932002-09-12 15:00:57 +000050 <function name='xmlCreateOutputBuffer' file='python'>
51 <info>Create a libxml2 output buffer from a Python file</info>
52 <return type='xmlOutputBufferPtr' info="the output buffer"/>
53 <arg name='file' type='pythonObject' info='the Python file'/>
54 <arg name='encoding' type='xmlChar *' info='an optionnal encoding'/>
55 </function>
56 <function name='xmlCreateInputBuffer' file='python'>
57 <info>Create a libxml2 input buffer from a Python file</info>
58 <return type='xmlParserInputBufferPtr' info="the input buffer"/>
59 <arg name='file' type='pythonObject' info='the Python file'/>
60 <arg name='encoding' type='xmlChar *' info='an optionnal encoding'/>
61 </function>
62 <function name='xmlSetEntityLoader' file='python'>
63 <info>Set the entity resolver as a python function</info>
64 <return type='int' info="0 in case of success, -1 for error"/>
65 <arg name='resolver' type='pythonObject' info='the Python function'/>
66 </function>
Daniel Veillardc575b992002-02-08 13:28:40 +000067 <!-- xmlParserCtxtPtr accessors -->
Daniel Veillard3ce52572002-02-03 15:08:05 +000068 <function name='xmlParserGetDoc' file='python_accessor'>
69 <info>Get the document tree from a parser context.</info>
70 <return type='xmlDocPtr' info="the document tree" field="myDoc"/>
Daniel Veillard26f1dcc2002-02-03 16:53:19 +000071 <arg name='ctxt' type='xmlParserCtxtPtr' info='the parser context'/>
72 </function>
73 <function name='xmlParserGetWellFormed' file='python_accessor'>
74 <info>Get the well formed information from a parser context.</info>
75 <return type='int' info="the wellFormed field" field="wellFormed"/>
76 <arg name='ctxt' type='xmlParserCtxtPtr' info='the parser context'/>
77 </function>
78 <function name='xmlParserGetIsValid' file='python_accessor'>
79 <info>Get the validity information from a parser context.</info>
80 <return type='int' info="the valid field" field="valid"/>
81 <arg name='ctxt' type='xmlParserCtxtPtr' info='the parser context'/>
82 </function>
83 <function name='xmlParserSetValidate' file='python_accessor'>
84 <info>Switch the parser to validation mode.</info>
85 <return type='void'/>
86 <arg name='ctxt' type='xmlParserCtxtPtr' info='the parser context'/>
87 <arg name='validate' type='int' info='1 to activate validation'/>
88 </function>
89 <function name='xmlParserSetReplaceEntities' file='python_accessor'>
90 <info>Switch the parser to replace entities.</info>
91 <return type='void'/>
92 <arg name='ctxt' type='xmlParserCtxtPtr' info='the parser context'/>
93 <arg name='replaceEntities' type='int' info='1 to replace entities'/>
94 </function>
95 <function name='xmlParserSetPedantic' file='python_accessor'>
96 <info>Switch the parser to be pedantic.</info>
97 <return type='void'/>
98 <arg name='ctxt' type='xmlParserCtxtPtr' info='the parser context'/>
99 <arg name='pedantic' type='int' info='1 to run in pedantic mode'/>
100 </function>
101 <function name='xmlParserSetLoadSubset' file='python_accessor'>
102 <info>Switch the parser to load the DTD without validating.</info>
103 <return type='void'/>
104 <arg name='ctxt' type='xmlParserCtxtPtr' info='the parser context'/>
105 <arg name='loadsubset' type='int' info='1 to load the DTD'/>
106 </function>
107 <function name='xmlParserSetLineNumbers' file='python_accessor'>
108 <info>Switch on the generation of line number for elements nodes.</info>
109 <return type='void'/>
110 <arg name='ctxt' type='xmlParserCtxtPtr' info='the parser context'/>
111 <arg name='linenumbers' type='int' info='1 to save line numbers'/>
Daniel Veillard3ce52572002-02-03 15:08:05 +0000112 </function>
Daniel Veillard4e1b26c2002-02-03 20:13:06 +0000113 <function name='xmlDebugMemory' file='python'>
114 <info>Switch on the generation of line number for elements nodes. Also returns the number of bytes allocated and not freed by libxml2 since memory debugging was switched on.</info>
115 <return type='int' info="returns the number of bytes allocated and not freed"/>
116 <arg name='activate' type='int' info='1 switch on memory debugging 0 switch it off'/>
117 </function>
118 <function name='xmlDumpMemory' file='python'>
119 <info>dump the memory allocated in the file .memdump</info>
120 <return type='void'/>
121 </function>
Daniel Veillardc575b992002-02-08 13:28:40 +0000122 <!-- xmlNsPtr accessors -->
Daniel Veillard36eea2d2002-02-04 00:17:01 +0000123 <function name='xmlNodeGetNs' file='python_accessor'>
124 <info>Get the namespace of a node</info>
125 <return type='xmlNsPtr' info="The namespace or None"/>
126 <arg name='node' type='xmlNodePtr' info='the node'/>
127 </function>
128 <function name='xmlNodeGetNsDefs' file='python_accessor'>
129 <info>Get the namespace of a node</info>
130 <return type='xmlNsPtr' info="The namespace or None"/>
131 <arg name='node' type='xmlNodePtr' info='the node'/>
132 </function>
Daniel Veillard8d24cc12002-03-05 15:41:29 +0000133 <!-- xmlXPathContextPtr accessors -->
Daniel Veillardc575b992002-02-08 13:28:40 +0000134 <function name='xmlXPathParserGetContext' file='python_accessor'>
Daniel Veillard95175012005-07-03 16:09:51 +0000135 <cond>defined(LIBXML_XPATH_ENABLED)</cond>
Daniel Veillardc575b992002-02-08 13:28:40 +0000136 <info>Get the xpathContext from an xpathParserContext</info>
137 <return type='xmlXPathContextPtr' info="The XPath context" field="context"/>
138 <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath parser context'/>
139 </function>
140 <function name='xmlXPathGetContextDoc' file='python_accessor'>
Daniel Veillard95175012005-07-03 16:09:51 +0000141 <cond>defined(LIBXML_XPATH_ENABLED)</cond>
Daniel Veillardc575b992002-02-08 13:28:40 +0000142 <info>Get the doc from an xpathContext</info>
143 <return type='xmlDocPtr' info="The doc context" field="doc"/>
144 <arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
145 </function>
146 <function name='xmlXPathGetContextNode' file='python_accessor'>
Daniel Veillard95175012005-07-03 16:09:51 +0000147 <cond>defined(LIBXML_XPATH_ENABLED)</cond>
Daniel Veillardc575b992002-02-08 13:28:40 +0000148 <info>Get the current node from an xpathContext</info>
149 <return type='xmlNodePtr' info="The node context" field="node"/>
150 <arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
151 </function>
Daniel Veillard8d24cc12002-03-05 15:41:29 +0000152 <function name='xmlXPathSetContextDoc' file='python_accessor'>
Daniel Veillard95175012005-07-03 16:09:51 +0000153 <cond>defined(LIBXML_XPATH_ENABLED)</cond>
Daniel Veillard8d24cc12002-03-05 15:41:29 +0000154 <info>Set the doc of an xpathContext</info>
155 <return type='void'/>
156 <arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
157 <arg name="doc" type='xmlDocPtr' info="The doc context"/>
158 </function>
159 <function name='xmlXPathSetContextNode' file='python_accessor'>
Daniel Veillard95175012005-07-03 16:09:51 +0000160 <cond>defined(LIBXML_XPATH_ENABLED)</cond>
Daniel Veillard8d24cc12002-03-05 15:41:29 +0000161 <info>Set the current node of an xpathContext</info>
162 <return type='void'/>
163 <arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
164 <arg name="node" type='xmlNodePtr' info="The node context"/>
165 </function>
Daniel Veillardc575b992002-02-08 13:28:40 +0000166 <function name='xmlXPathGetContextPosition' file='python_accessor'>
Daniel Veillard95175012005-07-03 16:09:51 +0000167 <cond>defined(LIBXML_XPATH_ENABLED)</cond>
Daniel Veillardc575b992002-02-08 13:28:40 +0000168 <info>Get the current node from an xpathContext</info>
169 <return type='int' info="The node context" field="proximityPosition"/>
170 <arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
171 </function>
172 <function name='xmlXPathGetContextSize' file='python_accessor'>
Daniel Veillard95175012005-07-03 16:09:51 +0000173 <cond>defined(LIBXML_XPATH_ENABLED)</cond>
Daniel Veillardc575b992002-02-08 13:28:40 +0000174 <info>Get the current node from an xpathContext</info>
175 <return type='int' info="The node context" field="contextSize"/>
176 <arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
177 </function>
178 <function name='xmlXPathGetFunction' file='python_accessor'>
Daniel Veillard95175012005-07-03 16:09:51 +0000179 <cond>defined(LIBXML_XPATH_ENABLED)</cond>
Daniel Veillardc575b992002-02-08 13:28:40 +0000180 <info>Get the current function name xpathContext</info>
181 <return type='const xmlChar *' info="The function name" field="function"/>
182 <arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
183 </function>
184 <function name='xmlXPathGetFunctionURI' file='python_accessor'>
Daniel Veillard95175012005-07-03 16:09:51 +0000185 <cond>defined(LIBXML_XPATH_ENABLED)</cond>
Daniel Veillardc575b992002-02-08 13:28:40 +0000186 <info>Get the current function name URI xpathContext</info>
187 <return type='const xmlChar *' info="The function name URI" field="functionURI"/>
188 <arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
189 </function>
Daniel Veillard6361da02002-02-23 10:10:33 +0000190 <!-- xmlURIPtr accessors -->
191 <function name='xmlURIGetScheme' file='python_accessor'>
192 <info>Get the scheme part from an URI</info>
193 <return type='const char *' info="The URI scheme" field="scheme"/>
194 <arg name='URI' type='xmlURIPtr' info='the URI'/>
195 </function>
196 <function name='xmlURISetScheme' file='python_accessor'>
197 <info>Set the scheme part of an URI.</info>
198 <return type='void'/>
199 <arg name='URI' type='xmlURIPtr' info='the URI'/>
200 <arg name='scheme' type='char *' info='The URI scheme part'/>
201 </function>
202 <function name='xmlURIGetOpaque' file='python_accessor'>
203 <info>Get the opaque part from an URI</info>
204 <return type='const char *' info="The URI opaque" field="opaque"/>
205 <arg name='URI' type='xmlURIPtr' info='the URI'/>
206 </function>
207 <function name='xmlURISetOpaque' file='python_accessor'>
208 <info>Set the opaque part of an URI.</info>
209 <return type='void'/>
210 <arg name='URI' type='xmlURIPtr' info='the URI'/>
211 <arg name='opaque' type='char *' info='The URI opaque part'/>
212 </function>
213 <function name='xmlURIGetAuthority' file='python_accessor'>
214 <info>Get the authority part from an URI</info>
215 <return type='const char *' info="The URI authority" field="authority"/>
216 <arg name='URI' type='xmlURIPtr' info='the URI'/>
217 </function>
218 <function name='xmlURISetAuthority' file='python_accessor'>
219 <info>Set the authority part of an URI.</info>
220 <return type='void'/>
221 <arg name='URI' type='xmlURIPtr' info='the URI'/>
222 <arg name='authority' type='char *' info='The URI authority part'/>
223 </function>
224 <function name='xmlURIGetServer' file='python_accessor'>
225 <info>Get the server part from an URI</info>
226 <return type='const char *' info="The URI server" field="server"/>
227 <arg name='URI' type='xmlURIPtr' info='the URI'/>
228 </function>
229 <function name='xmlURISetServer' file='python_accessor'>
230 <info>Set the server part of an URI.</info>
231 <return type='void'/>
232 <arg name='URI' type='xmlURIPtr' info='the URI'/>
233 <arg name='server' type='char *' info='The URI server part'/>
234 </function>
235 <function name='xmlURIGetUser' file='python_accessor'>
236 <info>Get the user part from an URI</info>
237 <return type='const char *' info="The URI user" field="user"/>
238 <arg name='URI' type='xmlURIPtr' info='the URI'/>
239 </function>
240 <function name='xmlURISetUser' file='python_accessor'>
241 <info>Set the user part of an URI.</info>
242 <return type='void'/>
243 <arg name='URI' type='xmlURIPtr' info='the URI'/>
244 <arg name='user' type='char *' info='The URI user part'/>
245 </function>
246 <function name='xmlURIGetPath' file='python_accessor'>
247 <info>Get the path part from an URI</info>
248 <return type='const char *' info="The URI path" field="path"/>
249 <arg name='URI' type='xmlURIPtr' info='the URI'/>
250 </function>
251 <function name='xmlURISetPath' file='python_accessor'>
252 <info>Set the path part of an URI.</info>
253 <return type='void'/>
254 <arg name='URI' type='xmlURIPtr' info='the URI'/>
255 <arg name='path' type='char *' info='The URI path part'/>
256 </function>
257 <function name='xmlURIGetQuery' file='python_accessor'>
258 <info>Get the query part from an URI</info>
259 <return type='const char *' info="The URI query" field="query"/>
260 <arg name='URI' type='xmlURIPtr' info='the URI'/>
261 </function>
262 <function name='xmlURISetQuery' file='python_accessor'>
263 <info>Set the query part of an URI.</info>
264 <return type='void'/>
265 <arg name='URI' type='xmlURIPtr' info='the URI'/>
266 <arg name='query' type='char *' info='The URI query part'/>
267 </function>
Daniel Veillard63cf1b92007-04-26 08:45:23 +0000268 <function name='xmlURIGetQueryRaw' file='python_accessor'>
269 <info>Get the raw query part from an URI (i.e. the unescaped form).</info>
270 <return type='const char *' info="The URI query" field="query_raw"/>
271 <arg name='URI' type='xmlURIPtr' info='the URI'/>
272 </function>
273 <function name='xmlURISetQueryRaw' file='python_accessor'>
274 <info>Set the raw query part of an URI (i.e. the unescaped form).</info>
275 <return type='void'/>
276 <arg name='URI' type='xmlURIPtr' info='the URI'/>
277 <arg name='query_raw' type='char *' info='The raw URI query part'/>
278 </function>
Daniel Veillard6361da02002-02-23 10:10:33 +0000279 <function name='xmlURIGetFragment' file='python_accessor'>
280 <info>Get the fragment part from an URI</info>
281 <return type='const char *' info="The URI fragment" field="fragment"/>
282 <arg name='URI' type='xmlURIPtr' info='the URI'/>
283 </function>
284 <function name='xmlURISetFragment' file='python_accessor'>
285 <info>Set the fragment part of an URI.</info>
286 <return type='void'/>
287 <arg name='URI' type='xmlURIPtr' info='the URI'/>
288 <arg name='fragment' type='char *' info='The URI fragment part'/>
289 </function>
290 <function name='xmlURIGetPort' file='python_accessor'>
291 <info>Get the port part from an URI</info>
292 <return type='int' info="The URI port" field="port"/>
293 <arg name='URI' type='xmlURIPtr' info='the URI'/>
294 </function>
295 <function name='xmlURISetPort' file='python_accessor'>
296 <info>Set the port part of an URI.</info>
297 <return type='void'/>
298 <arg name='URI' type='xmlURIPtr' info='the URI'/>
299 <arg name='port' type='int' info='The URI port part'/>
300 </function>
Daniel Veillard46da4642004-01-06 22:54:57 +0000301 <!-- xmlErrorPtr accessors -->
302 <function name='xmlErrorGetDomain' file='python_accessor'>
303 <info>What part of the library raised this error</info>
304 <return type='int' info="The error domain" field="domain"/>
305 <arg name='Error' type='xmlErrorPtr' info='the Error'/>
306 </function>
307 <function name='xmlErrorGetCode' file='python_accessor'>
308 <info>The error code, e.g. an xmlParserError</info>
309 <return type='int' info="The error code" field="code"/>
310 <arg name='Error' type='xmlErrorPtr' info='the Error'/>
311 </function>
312 <function name='xmlErrorGetMessage' file='python_accessor'>
313 <info>human-readable informative error message</info>
314 <return type='const char *' info="The error message" field="message"/>
315 <arg name='Error' type='xmlErrorPtr' info='the Error'/>
316 </function>
317 <function name='xmlErrorGetLevel' file='python_accessor'>
318 <info>how consequent is the error</info>
319 <return type='int' info="The error level" field="level"/>
320 <arg name='Error' type='xmlErrorPtr' info='the Error'/>
321 </function>
322 <function name='xmlErrorGetFile' file='python_accessor'>
323 <info>the filename</info>
324 <return type='const char *' info="The error file" field="file"/>
325 <arg name='Error' type='xmlErrorPtr' info='the Error'/>
326 </function>
327 <function name='xmlErrorGetLine' file='python_accessor'>
328 <info>the line number if available</info>
329 <return type='int' info="The error line" field="line"/>
330 <arg name='Error' type='xmlErrorPtr' info='the Error'/>
331 </function>
Daniel Veillardf93a8662004-07-01 12:56:30 +0000332 <function name='xmlPythonCleanupParser' file='python'>
333 <info>Cleanup function for the XML library. It tries to reclaim all parsing related global memory allocated for the library processing. It doesn't deallocate any document related memory. Calling this function should not prevent reusing the library but one should call xmlCleanupParser() only when the process has finished using the library or XML document built with it.</info>
334 <return type='void'/>
335 </function>
Daniel Veillard529233c2004-07-02 12:23:44 +0000336 <function name='xmlMemoryUsed' file='python'>
337 <info>Returns the total amount of memory allocated by libxml2</info>
338 <return type='int' info='number of bytes allocated'/>
339 </function>
Daniel Veillard9589d452002-02-02 10:28:17 +0000340 </symbols>
341</api>