Release 0.7.8
[vala-lang.git] / vapi / libxml-2.0.vapi
blobf0dfc98130011e066606420556e3606b4cabf896
1 /* libxml2.vala
2  *
3  * Copyright (C) 2006-2008  Jürg Billeter, Raffaele Sandrini, Michael Lawrence
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
18  *
19  * Author:
20  *      Jürg Billeter <j@bitron.ch>
21  *      Raffaele Sandrini <rasa@gmx.ch>
22  *      Michael Lawrence <lawremi@iastate.edu>
23  *      Ondřej Jirman <megous@megous.com>
24  */
26 namespace Xml {
27         /* nanoftp - minimal FTP implementation */
29         [CCode (cname = "ftpDataCallback", cheader_filename = "libxml/nanoftp.h")]
30         public static delegate void FtpDataCallback (void* userData, [CCode (array_length = false)] char[] data, int len);
32         [CCode (cname = "ftpListCallback", cheader_filename = "libxml/nanoftp.h")]
33         public static delegate void FtpListCallback (void* userData, string filename, string attrib, string owner, string group, ulong size, int links, int year, string month, int day, int hour, int minute);
35         [Compact]
36         [CCode (cname = "void", free_function = "xmlNanoFTPFreeCtxt", cheader_filename = "libxml/nanoftp.h")]
37         public class NanoFTP {
38                 [CCode (cname = "xmlNanoFTPCheckResponse")]
39                 public int check_response ();
41                 [CCode (cname = "xmlNanoFTPCleanup")]
42                 public static void cleanup ();
44                 [CCode (cname = "xmlNanoFTPClose")]
45                 public int close ();
47                 [CCode (cname = "xmlNanoFTPCloseConnection")]
48                 public int close_connection ();
50                 [CCode (cname = "xmlNanoFTPConnect")]
51                 public int connect ();
53                 [CCode (cname = "xmlNanoFTPConnectTo")]
54                 public static NanoFTP* connect_to (string server, int port);
56                 [CCode (cname = "xmlNanoFTPCwd")]
57                 public int cwd (string directory);
59                 [CCode (cname = "xmlNanoFTPDele")]
60                 public int dele (string file);
62                 [CCode (cname = "xmlNanoFTPGet")]
63                 public int get (FtpDataCallback cb, void* user_data, string filename);
65                 [CCode (cname = "xmlNanoFTPGetConnection")]
66                 public int get_connection ();
68                 [CCode (cname = "xmlNanoFTPGetResponse")]
69                 public int get_response ();
71                 [CCode (cname = "xmlNanoFTPGetSocket")]
72                 public int get_socket (string filename);
74                 [CCode (cname = "xmlNanoFTPInit")]
75                 public static void init ();
77                 [CCode (cname = "xmlNanoFTPList")]
78                 public int list (FtpListCallback cb, void* user_data, string filename);
80                 [CCode (cname = "xmlNanoFTPNewCtxt")]
81                 public NanoFTP (string url);
83                 [CCode (cname = "xmlNanoFTPOpen")]
84                 public static NanoFTP* open (string url);
86                 [CCode (cname = "xmlNanoFTPProxy")]
87                 public static void proxy (string host, int port, string user, string passwd, int type);
89                 [CCode (cname = "xmlNanoFTPQuit")]
90                 public int quit ();
92                 [CCode (cname = "xmlNanoFTPRead")]
93                 public int read (void* dest, int len);
95                 [CCode (cname = "xmlNanoFTPScanProxy")]
96                 public static void scan_proxy (string url);
98                 [CCode (cname = "xmlNanoFTPUpdateURL")]
99                 public int update_url (string url);
100         }
103         /* nanohttp - minimal HTTP implementation */
105         [Compact]
106         [CCode (cname = "void", cheader_filename = "libxml/nanohttp.h")]
107         public class NanoHTTP {
108                 [CCode (cname = "xmlNanoHTTPAuthHeader")]
109                 public weak string auth_header ();
111                 [CCode (cname = "xmlNanoHTTPCleanup")]
112                 public static void cleanup ();
114                 [CCode (cname = "xmlNanoHTTPClose")]
115                 public int close ();
117                 [CCode (cname = "xmlNanoHTTPContentLength")]
118                 public int content_length ();
120                 [CCode (cname = "xmlNanoHTTPEncoding")]
121                 public weak string http_encoding ();
123                 [CCode (cname = "xmlNanoHTTPFetch")]
124                 public static int fetch (string url, string filename, out string content_type);
126                 [CCode (cname = "xmlNanoHTTPInit")]
127                 public static void init ();
129                 [CCode (cname = "xmlNanoHTTPMethod")]
130                 public static NanoHTTP* method (string url, string method, string input, out string content_type, string headers, int ilen);
132                 [CCode (cname = "xmlNanoHTTPMethodRedir")]
133                 public static NanoHTTP* method_redir (string url, string method, string input, out string content_type, out string redir, string headers, int ilen);
135                 [CCode (cname = "xmlNanoHTTPMimeType")]
136                 public string mime_type ();
138                 [CCode (cname = "xmlNanoHTTPOpen")]
139                 public static NanoHTTP* open (string url, out string content_type);
141                 [CCode (cname = "xmlNanoHTTPOpenRedir")]
142                 public static NanoHTTP* open_redir (string url, out string content_type, out string redir);
144                 [CCode (cname = "xmlNanoHTTPRead")]
145                 public int read (void* dest, int len);
147                 [CCode (cname = "xmlNanoHTTPRedir")]
148                 public weak string redir ();
150                 [CCode (cname = "xmlNanoHTTPReturnCode")]
151                 public int return_code ();
153                 [CCode (cname = "xmlNanoHTTPSave")]
154                 public int save (string filename);
156                 [CCode (cname = "xmlNanoHTTPScanProxy")]
157                 public static void scan_proxy (string URL);
158         }
161         /* parser - the core parser module */
163         [CCode (cheader_filename = "libxml/parser.h")]
164         namespace Parser {
165                 [CCode (cname = "xmlCleanupParser")]
166                 public static void cleanup ();
168                 [CCode (cname = "xmlInitParser")]
169                 public static void init ();
171                 [CCode (cname = "xmlParseDoc")]
172                 public static Doc* parse_doc (string cur);
174                 [CCode (cname = "xmlParseFile")]
175                 public static Doc* parse_file (string filename);
177                 [CCode (cname = "xmlParseMemory")]
178                 public static Doc* parse_memory (string buffer, int size);
180                 [CCode (cname = "xmlReadDoc")]
181                 public static Doc* read_doc (string cur, string? url = null, string? encoding = null, int options = 0);
183                 [CCode (cname = "xmlReadFd")]
184                 public static Doc* read_fd (int fd, string? base_url = null, string? encoding = null, int options = 0);
186                 [CCode (cname = "xmlReadFile")]
187                 public static Doc* read_file (string filename, string? encoding = null, int options = 0);
189                 [CCode (cname = "xmlReadMemory")]
190                 public static Doc* read_memory (string text, int len, string? url = null, string? encoding = null, int options = 0);
191         }
193         [CCode (cname = "xmlParserOption", cprefix = "XML_PARSE_", cheader_filename = "libxml/parser.h")]
194         public enum ParserOption {
195                 RECOVER,
196                 NOENT,
197                 DTDLOAD,
198                 DTDATTR,
199                 DTDVALID,
200                 NOERROR,
201                 NOWARNING,
202                 PEDANTIC,
203                 NOBLANKS,
204                 SAX1,
205                 XINCLUDE,
206                 NONET,
207                 NODICT,
208                 NSCLEAN,
209                 NOCDATA,
210                 NOXINCNODE,
211                 COMPACT,
212         }
215         /* tree - interfaces for tree manipulation */
217         [CCode (cheader_filename = "libxml/tree.h")]
218         namespace Tree {
219                 [CCode (cname = "xmlGetCompressMode")]
220                 public static int get_compress_mode ();
222                 [CCode (cname = "xmlIsXHTML")]
223                 public static int is_xhtml (string system_id, string public_id);
225                 [CCode (cname = "xmlSetCompressMode")]
226                 public static void set_compress_mode (int mode);
227         }
229         [Compact]
230         [CCode (cname = "xmlAttr", cheader_filename = "libxml/tree.h")]
231         public class Attr {
232                 public ElementType type;
233                 public weak string name;
234                 public Node* children;
235                 public Node* last;
236                 public Node* parent;
237                 public Attr* next;
238                 public Attr* prev;
239                 public Doc* doc;
240                 public Ns* ns;
241                 public AttributeType atype;
243                 [CCode (cname = "xmlRemoveProp")]
244                 public int remove();
245         }
247         [Compact]
248         [CCode (cname = "xmlAttribute", cheader_filename = "libxml/tree.h")]
249         public class Attribute {
250                 public ElementType type;
251                 public weak string name;
252                 public Node* children;
253                 public Node* last;
254                 public Dtd* parent;
255                 public Node* next;
256                 public Node* prev;
257                 public Doc* doc;
258                 public Attribute* nexth;
259                 public AttributeType atype;
260                 public AttributeDefault def;
261                 public weak string default_value;
262                 public weak string prefix;
263                 public weak string elem;
264         }
266         [CCode (cname = "xmlAttributeDefault", cprefix = "XML_ATTRIBUTE_", cheader_filename = "libxml/tree.h")]
267         public enum AttributeDefault {
268                 NONE,
269                 REQUIRED,
270                 IMPLIED,
271                 FIXED
272         }
274         [CCode (cname = "xmlAttributeType", cprefix = "XML_ATTRIBUTE_", cheader_filename = "libxml/tree.h")]
275         public enum AttributeType {
276                 CDATA,
277                 ID,
278                 IDREF ,
279                 IDREFS,
280                 ENTITY,
281                 ENTITIES,
282                 NMTOKEN,
283                 NMTOKENS,
284                 ENUMERATION,
285                 NOTATION
286         }
288         [Compact]
289         [CCode (cname = "xmlDoc", free_function = "xmlFreeDoc", cheader_filename = "libxml/tree.h,libxml/parser.h")]
290         public class Doc {
291                 public ElementType type;
292                 public string name;
293                 public Node* children;
294                 public Node* last;
295                 public Node* parent;
296                 public Node* next;
297                 public Node* prev;
298                 public Doc* doc;
299                 public int compression;
300                 public int standalone;
301                 public Dtd* int_subset;
302                 public Dtd* ext_subset;
303                 public Ns* old_ns;
304                 public weak string version;
305                 public weak string encoding;
306                 public weak string url;
307                 public int charset;
309                 [CCode (cname = "xmlCopyDoc")]
310                 public Doc* copy (int recursive);
312                 [CCode (cname = "xmlCreateIntSubset")]
313                 public Dtd* create_int_subset (string name, string external_id, string system_id);
315                 [CCode (cname = "xmlDocDump")]
316                 public static int dump (GLib.FileStream f, Doc* cur);
318                 [CCode (cname = "xmlDocDumpFormatMemory")]
319                 public void dump_memory_format (out string mem, out int len = null, bool format = true);
321                 [CCode (cname = "xmlDocDumpFormatMemoryEnc")]
322                 public void dump_memory_enc_format (out string mem, out int len = null, string enc = "UTF-8", bool format = true);
324                 [CCode (cname = "xmlDocDumpMemory")]
325                 public void dump_memory (out string mem, out int len = null);
327                 [CCode (cname = "xmlDocDumpMemoryEnc")]
328                 public void dump_memory_enc (out string mem, out int len = null, string enc = "UTF-8");
330                 [CCode (cname = "xmlDocFormatDump")]
331                 public static int dump_format (GLib.FileStream f, Doc* cur, bool format = true);
333                 [CCode (cname = "xmlDocGetRootElement")]
334                 public Node* get_root_element();
336                 [CCode (cname = "xmlDocSetRootElement")]
337                 public Node* set_root_element(Node* root);
339                 [CCode (cname = "xmlElemDump")]
340                 public static void elem_dump (GLib.FileStream f, Doc* doc, Node* cur);
342                 [CCode (cname = "xmlGetDocCompressMode")]
343                 public int get_compress_mode ();
345                 [CCode (cname = "xmlNewCDataBlock")]
346                 public Node* new_cdata_block (string content, int len);
348                 [CCode (cname = "xmlNewCharRef")]
349                 public Node* new_char_ref (string name);
351                 [CCode (cname = "xmlNewDoc")]
352                 public Doc (string version);
354                 [CCode (cname = "xmlNewDocComment")]
355                 public Node* new_comment (string content);
357                 [CCode (cname = "xmlNewDocFragment")]
358                 public Node* new_fragment ();
360                 [CCode (cname = "xmlNewDocNode")]
361                 public Node* new_node (Ns* ns, string name, string? content = null);
363                 [CCode (cname = "xmlNewDocNodeEatName")]
364                 public Node* new_node_eat_name (Ns* ns, owned string name, string? content = null);
366                 [CCode (cname = "xmlNewDocPI")]
367                 public Node* new_pi (string name, string content);
369                 [CCode (cname = "xmlNewDocProp")]
370                 public Attr* new_prop (string name, string value);
372                 [CCode (cname = "xmlNewDocRawNode")]
373                 public Node* new_raw_node (Ns* ns, string name, string? content = null);
375                 [CCode (cname = "xmlNewDocText")]
376                 public Node* new_text (string content);
378                 [CCode (cname = "xmlNewDocTextLen")]
379                 public Node* new_text_len (string content, int len);
381                 [CCode (cname = "xmlNewReference")]
382                 public Node* new_reference (string name);
384                 [CCode (cname = "xmlNodeListGetRawString")]
385                 public string node_list_get_raw_string (Node* list, int _inline);
387                 [CCode (cname = "xmlNodeListGetString")]
388                 public string node_list_get_string (Node* list, int _inline);
390                 [CCode (cname = "xmlSaveFile", instance_pos = -1)]
391                 public int save_file (string filename);
393                 [CCode (cname = "xmlSaveFileEnc")]
394                 public static void save_file_enc (string filename, Doc* cur, string enc = "UTF-8");
396                 [CCode (cname = "xmlSaveFormatFile")]
397                 public static void save_format_file (string filename, Doc* cur, int format);
399                 [CCode (cname = "xmlSaveFormatFileEnc")]
400                 public static void save_format_file_enc (string filename, Doc* cur, string enc, int format);
402                 [CCode (cname = "xmlSetDocCompressMode")]
403                 public void set_compress_mode (int mode);
405                 [CCode (cname = "xmlStringGetNodeList")]
406                 public Node* string_get_node_list (string str);
408                 [CCode (cname = "xmlStringLenGetNodeList")]
409                 public Node* string_len_get_node_list (string str, int len);
410         }
412         [Compact]
413         [CCode (cname = "xmlDtd", cheader_filename = "libxml/tree.h")]
414         public class Dtd {
415                 public ElementType type;
416                 public string name;
417                 public Node* children;
418                 public Node* last;
419                 public Node* parent;
420                 public Node* next;
421                 public Node* prev;
422                 public Doc* doc;
424                 public weak string external_id;
425                 public weak string system_id;
427                 [CCode (cname = "xmlNewDtd")]
428                 public Dtd (Doc* doc, string name, string external_id, string system_id);
430                 [CCode (cname = "xmlCopyDtd")]
431                 public Dtd* copy();
432         }
434         [Compact]
435         [CCode (cname = "xmlElement", cheader_filename = "libxml/tree.h")]
436         public class Element {
437                 public ElementType type;
438                 public weak string name;
439                 public Node* children;
440                 public Node* last;
441                 public Dtd* parent;
442                 public Node* next;
443                 public Node* prev;
444                 public Doc* doc;
445                 public Attribute* attributes;
446                 public weak string prefix;
447         }
449         [CCode (cname = "xmlElementType", cprefix = "XML_", cheader_filename = "libxml/tree.h")]
450         public enum ElementType {
451                 ELEMENT_NODE,
452                 ATTRIBUTE_NODE,
453                 TEXT_NODE,
454                 CDATA_SECTION_NODE,
455                 ENTITY_REF_NODE,
456                 ENTITY_NODE,
457                 PI_NODE,
458                 COMMENT_NODE,
459                 DOCUMENT_NODE,
460                 DOCUMENT_TYPE_NODE,
461                 DOCUMENT_FRAG_NODE,
462                 NOTATION_NODE,
463                 HTML_DOCUMENT_NODE,
464                 DTD_NODE,
465                 ELEMENT_DECL,
466                 ATTRIBUTE_DECL,
467                 ENTITY_DECL,
468                 NAMESPACE_DECL,
469                 XINCLUDE_START,
470                 XINCLUDE_END,
471                 DOCB_DOCUMENT_NODE
472         }
474         [Compact]
475         [CCode (cname = "xmlElementContent", free_function = "xmlFreeElementContent", cheader_filename = "libxml/tree.h")]
476         public class ElementContent {
477                 [CCode (cname = "xmlNewElementContent")]
478                 ElementContent (string name, ElementContentType type);
480                 public ElementContentType type;
481                 public ElementContentOccur ocur;
482                 public const string name;
483                 public ElementContent c1;
484                 public ElementContent c2;
485                 public ElementContent parent;
486                 public const string prefix;
487         }
489         [CCode (cname = "xmlElementContentType", cprefix = "XML_ELEMENT_CONTENT_", cheader_filename = "libxml/tree.h")]
490         public enum ElementContentType {
491                 PCDATA,
492                 ELEMENT,
493                 SEQ,
494                 OR
495         }
497         [CCode (cname = "xmlElementContentOccur", cprefix = "XML_ELEMENT_CONTENT_", cheader_filename = "libxml/tree.h")]
498         public enum ElementContentOccur {
499                 ONCE,
500                 OPT,
501                 MULT,
502                 PLUS
503         }
505         [Compact]
506         [CCode (cname = "xmlEntity", cheader_filename = "libxml/tree.h")]
507         public struct Entity {
508                 public void* private;
509                 public ElementType type;
510                 public const string name;
511                 public Node* children;
512                 public Node* last;
513                 public Dtd* parent;
514                 public Node* next;
515                 public Node* prev;
516                 public Doc* doc;
517                 public string orig;
518                 public string content;
519                 public int length;
520                 public EntityType etype;
521                 public const string ExternalID;
522                 public const string SystemID;
523                 public Entity* nexte;
524                 public const string URI;
525                 public int owner;
526                 public int checked;
527         }
529         [CCode (cname = "xmlEntityType", cprefix = "XML_", cheader_filename = "libxml/tree.h")]
530         public enum EntityType {
531                 INTERNAL_GENERAL_ENTITY,
532                 EXTERNAL_GENERAL_PARSED_ENTITY,
533                 EXTERNAL_GENERAL_UNPARSED_ENTITY,
534                 INTERNAL_PARAMETER_ENTITY,
535                 EXTERNAL_PARAMETER_ENTITY,
536                 INTERNAL_PREDEFINED_ENTITY
537         }
539         [Compact]
540         [CCode (cname = "xmlEnumeration", cheader_filename = "libxml/tree.h")]
541         public struct Enumeration {
542                 public Enumeration* next;
543                 public const string name;
544         }
547         [Compact]
548         [CCode (cname = "xmlNode", free_function = "xmlFreeNode", cheader_filename = "libxml/tree.h")]
549         public class Node {
550                 public ElementType type;
551                 public weak string name;
552                 public Node* children;
553                 public Node* last;
554                 public Node* parent;
555                 public Node* next;
556                 public Node* prev;
557                 public Doc* doc;
558                 public Ns* ns;
559                 public string content;
560                 public Attr* properties;
561                 public Ns* ns_def;
562                 public ushort line;
563                 public ushort extra;
565                 [CCode (cname = "xmlAddChild")]
566                 public Node* add_child (Node* cur);
568                 [CCode (cname = "xmlAddChildList")]
569                 public Node* add_child_list (Node* cur);
571                 [CCode (cname = "xmlAddNextSibling")]
572                 public Node* add_next_sibling (Node* elem);
574                 [CCode (cname = "xmlAddPrevSibling")]
575                 public Node* add_prev_sibling (Node* elem);
577                 [CCode (cname = "xmlAddSibling")]
578                 public Node* add_sibling (Node* elem);
580                 [CCode (cname = "xmlCopyNode")]
581                 public Node* copy (int extended);
583                 [CCode (cname = "xmlCopyNodeList")]
584                 public Node copy_list();
586                 [CCode (cname = "xmlDocCopyNode")]
587                 public Node* doc_copy (Doc* doc, int extended);
589                 [CCode (cname = "xmlDocCopyNodeList")]
590                 public Node* doc_copy_list (Doc* doc);
592                 [CCode (cname = "xmlFreeNodeList")]
593                 public void free_list ();
595                 [CCode (cname = "xmlGetLastChild")]
596                 public Node* get_last_child ();
598                 [CCode (cname = "xmlGetLineNo")]
599                 public long get_line_no ();
601                 [CCode (cname = "xmlGetNoNsProp")]
602                 public string? get_no_ns_prop (string name);
604                 [CCode (cname = "xmlGetNodePath")]
605                 public string get_path ();
607                 [CCode (cname = "xmlGetNsProp")]
608                 public string? get_ns_prop (string name, string ns);
610                 [CCode (cname = "xmlGetProp")]
611                 public string? get_prop (string name);
613                 [CCode (cname = "xmlHasNsProp")]
614                 public Attr* has_ns_prop (string name, string name_space);
616                 [CCode (cname = "xmlHasProp")]
617                 public Attr* has_prop (string name);
619                 [CCode (cname = "xmlIsBlankNode")]
620                 public int is_blank ();
622                 [CCode (cname = "xmlNewChild")]
623                 public Node* new_child (Ns* ns, string name, string? content = null);
625                 [CCode (cname = "xmlNewNs")]
626                 public Ns* new_ns (string href, string prefix);
628                 [CCode (cname = "xmlNewNsProp")]
629                 public Attr* new_ns_prop (Ns* ns, string name, string value);
631                 [CCode (cname = "xmlNewProp")]
632                 public Attr* new_prop (string name, string value);
634                 [CCode (cname = "xmlNewTextChild")]
635                 public Node* new_text_child (Ns* ns, string name, string content);
637                 [CCode (cname = "xmlNodeAddContent")]
638                 public void add_content (string content);
640                 [CCode (cname = "xmlNodeAddContentLen")]
641                 public void add_content_len (string content, int len);
643                 [CCode (cname = "xmlNodeGetContent")]
644                 public string get_content();
646                 [CCode (cname = "xmlNodeGetLang")]
647                 public string get_lang();
649                 [CCode (cname = "xmlNodeGetSpacePreserve")]
650                 public int get_space_preserve();
652                 [CCode (cname = "xmlNodeIsText")]
653                 public int is_text();
655                 [CCode (cname = "xmlNodeSetContent")]
656                 public void set_content (string content);
658                 [CCode (cname = "xmlNodeSetContentLen")]
659                 public void set_content_len (string content, int len);
661                 [CCode (cname = "xmlNodeSetLang")]
662                 public void set_lang (string val);
664                 [CCode (cname = "xmlNodeSetName")]
665                 public void set_name (string name);
667                 [CCode (cname = "xmlNodeSetSpacePreserve")]
668                 public void set_space_preserve (int val);
670                 [CCode (cname = "xmlReplaceNode")]
671                 public Node* replace (Node* cur);
673                 [CCode (cname = "xmlNewComment")]
674                 public Node.comment (string content);
676                 [CCode (cname = "xmlNewNode")]
677                 public Node (Ns* ns, string name);
679                 [CCode (cname = "xmlNewNodeEatName")]
680                 public Node.eat_name (Ns* ns, owned string name);
682                 [CCode (cname = "xmlNewText")]
683                 public Node.text (string content);
685                 [CCode (cname = "xmlNewTextLen")]
686                 public Node.text_len (string content, int len);
688                 [CCode (cname = "xmlNewPI")]
689                 public Node.pi (string name, string content);
691                 [CCode (cname = "xmlSetListDoc")]
692                 public void set_list_doc (Doc* doc);
694                 [CCode (cname = "xmlSetNsProp")]
695                 public Attr* set_ns_prop (Ns* ns, string name, string value);
697                 [CCode (cname = "xmlSetProp")]
698                 public Attr* set_prop (string name, string value);
700                 [CCode (cname = "xmlSetTreeDoc")]
701                 public void set_tree_doc (Doc* doc);
703                 [CCode (cname = "xmlTextConcat")]
704                 public int text_concat (string content, int len);
706                 [CCode (cname = "xmlTextMerge")]
707                 public Node* text_merge (Node* second);
709                 [CCode (cname = "xmlUnlinkNode")]
710                 public void unlink ();
712                 [CCode (cname = "xmlUnsetNsProp")]
713                 public int unset_ns_prop (Ns* ns, string name);
715                 [CCode (cname = "xmlUnsetProp")]
716                 public int unset_prop (string name);
717         }
719         [Compact]
720         [CCode (cname = "xmlNs", cheader_filename = "libxml/tree.h")]
721         public class Ns {
722                 [CCode (cname = "xmlNewNs")]
723                 public static Ns* create (Xml.Node* node, string href, string prefix);
724                 public Ns* next;
725                 public ElementType type;
726                 public string href;
727                 public string prefix;
728                 public Doc* context;
729         }
731         [Compact]
732         [CCode (cname = "xmlParserCtxt")]
733         public class ParserCtxt {
734                 public SAXHandler* sax;
735                 public void* user_data;
737                 [CCode (cname = "xmlParseDocument")]
738                 public int parse_document ();
739         }
742         /* uri - library of generic URI related routines */
744         [Compact]
745         [CCode (cname = "xmlURI", free_function = "xmlFreeURI", cheader_filename = "libxml/uri.h")]
746         public class URI {
747                 [CCode (cname = "xmlBuildRelativeURI")]
748                 public static string build_relative (string uri, string @base);
750                 [CCode (cname = "xmlBuildURI")]
751                 public static string build (string URI, string @base);
753                 [CCode (cname = "xmlCanonicPath")]
754                 public static string canonic_path (string path);
756                 [CCode (cname = "xmlCreateURI")]
757                 public URI ();
759                 [CCode (cname = "xmlNormalizeURIPath")]
760                 public static int normalize_uri_path (string path);
762                 [CCode (cname = "xmlParseURI")]
763                 public static URI parse (string str);
765                 [CCode (cname = "xmlParseURIRaw")]
766                 public static URI parse_raw (string str, int raw);
768                 [CCode (cname = "xmlParseURIReference")]
769                 public int parse_reference (string str);
771                 [CCode (cname = "xmlPathToURI")]
772                 public static string path_to_uri (string path);
774                 [CCode (cname = "xmlPrintURI", instance_pos = -1)]
775                 public void print (GLib.FileStream stream);
777                 [CCode (cname = "xmlSaveUri")]
778                 public string save ();
780                 [CCode (cname = "xmlURIEscape")]
781                 public static string escape (string str);
783                 [CCode (cname = "xmlURIEscapeStr")]
784                 public static string escape_str (string str, string list);
786                 [CCode (cname = "xmlURIUnescapeString")]
787                 public static string unescape_string (string str, int len, string? target);
789                 public string scheme;
790                 public string opaque;
791                 public string authority;
792                 public string server;
793                 public string user;
794                 public int port;
795                 public string path;
796                 public string query;
797                 public string fragment;
798                 public int cleanup;
799                 public string query_raw;
800         }
803         /* xmlIO - interface for the I/O interfaces used by the parser */
805         [CCode (cname = "xmlInputCloseCallback", cheader_filename = "libxml/xmlIO.h")]
806         public static delegate int InputCloseCallback (void* context);
808         [CCode (cname = "xmlInputReadCallback", cheader_filename = "libxml/xmlIO.h")]
809         public static delegate int InputReadCallback (void* context, [CCode (array_length = false)] char[] buffer, int len);
812         /* xmlschemas - incomplete XML Schemas structure implementation */
814         [Compact]
815         [CCode (cname = "xmlSchemaValidCtxt", cheader_filename = "libxml/xmlreader.h")]
816         public class SchemaValidCtxt {
817         }
820         /* xmlreader - the XMLReader implementation */
822         [CCode (cname = "xmlParserProperties", cprefix = "XML_PARSER_", cheader_filename = "libxml/xmlreader.h")]
823         public enum ParserProperties {
824                 LOADDTD,
825                 DEFAULTATTRS,
826                 VALIDATE,
827                 SUBST_ENTITIES
828         }
830         [CCode (cname = "xmlParserSeverities", cprefix = "XML_PARSER_SEVERITY_", cheader_filename = "libxml/xmlreader.h")]
831         public enum ParserSeverities {
832                 VALIDITY_WARNING,
833                 VALIDITY_ERROR,
834                 WARNING,
835                 ERROR
836         }
838         [CCode (cname = "xmlReaderTypes",  cheader_filename = "libxml/xmlreader.h")]
839         public enum ReaderType {
840                 NONE,
841                 ELEMENT,
842                 ATTRIBUTE,
843                 TEXT,
844                 CDATA,
845                 ENTITY_REFERENCE,
846                 ENTITY,
847                 PROCESSING_INSTRUCTION,
848                 COMMENT,
849                 DOCUMENT,
850                 DOCUMENT_TYPE,
851                 DOCUMENT_FRAGMENT,
852                 NOTATION,
853                 WHITESPACE,
854                 SIGNIFICANT_WHITESPACE,
855                 END_ELEMENT,
856                 END_ENTITY,
857                 XML_DECLARATION
858         }
860         [Compact]
861         [CCode (cname = "xmlTextReader", free_function = "xmlFreeTextReader", cheader_filename = "libxml/xmlreader.h")]
862         public class TextReader {
863                 [CCode (cname = "xmlNewTextReaderFilename")]
864                 public TextReader.filename (string uri);
866                 [CCode (cname = "xmlReaderForDoc")]
867                 public TextReader.for_doc (string cur, string url, string? encoding, int options);
869                 [CCode (cname = "xmlReaderForFd")]
870                 public TextReader.for_fd (int fd, string url, string? encoding, int options);
872                 [CCode (cname = "xmlReaderForFile")]
873                 public TextReader.for_file (string filename, string? encoding, int options);
875                 [CCode (cname = "xmlReaderForIO")]
876                 public TextReader.for_io (InputReadCallback ioread, InputCloseCallback ioclose, void* ioctx, string url, string encoding, int options);
878                 [CCode (cname = "xmlReaderForMemory")]
879                 public TextReader.for_memory ([CCode (array_length = false)] char[] buffer, int size, string url, string encoding, int options);
881                 [CCode (cname = "xmlReaderNewDoc")]
882                 public int new_doc (string cur, string url, string? encoding, int options);
884                 [CCode (cname = "xmlReaderNewFd")]
885                 public int new_fd (int fd, string url, string? encoding, int options);
887                 [CCode (cname = "xmlReaderNewFile")]
888                 public int new_file (string filename, string? encoding, int options);
890                 [CCode (cname = "xmlReaderNewIO")]
891                 public int new_io (InputReadCallback ioread, InputCloseCallback ioclose, void* ioctx, string url, string encoding, int options);
893                 [CCode (cname = "xmlReaderNewMemory")]
894                 public int new_memory ([CCode (array_length = false)] char[] buffer, int size, string url, string? encoding, int options);
896                 [CCode (cname = "xmlReaderNewWalker")]
897                 public int new_walker (Doc* doc);
899                 [CCode (cname = "xmlReaderWalker")]
900                 public TextReader.walker (Doc* doc);
902                 [CCode (cname = "xmlTextReaderAttributeCount")]
903                 public int attribute_count ();
905                 [CCode (cname = "xmlTextReaderBaseUri")]
906                 public string base_uri ();
908                 [CCode (cname = "xmlTextReaderByteConsumed")]
909                 public long byte_consumed ();
911                 [CCode (cname = "xmlTextReaderClose")]
912                 public int close ();
914                 [CCode (cname = "xmlTextReaderConstBaseUri")]
915                 public weak string const_base_uri ();
917                 [CCode (cname = "xmlTextReaderConstEncoding")]
918                 public weak string const_encoding ();
920                 [CCode (cname = "xmlTextReaderConstLocalName")]
921                 public weak string const_local_name ();
923                 [CCode (cname = "xmlTextReaderConstName")]
924                 public weak string const_name ();
926                 [CCode (cname = "xmlTextReaderConstNamespaceUri")]
927                 public weak string const_namespace_uri ();
929                 [CCode (cname = "xmlTextReaderConstPrefix")]
930                 public weak string const_prefix ();
932                 [CCode (cname = "xmlTextReaderConstString")]
933                 public weak string const_string (string str);
935                 [CCode (cname = "xmlTextReaderConstValue")]
936                 public weak string const_value ();
938                 [CCode (cname = "xmlTextReaderConstXmlLang")]
939                 public weak string const_xml_lang ();
941                 [CCode (cname = "xmlTextReaderConstXmlVersion")]
942                 public weak string const_xml_version ();
944                 [CCode (cname = "xmlTextReaderCurrentDoc")]
945                 public Doc* current_doc ();
947                 [CCode (cname = "xmlTextReaderCurrentNode")]
948                 public Node* current_node ();
950                 [CCode (cname = "xmlTextReaderDepth")]
951                 public int depth ();
953                 [CCode (cname = "xmlTextReaderExpand")]
954                 public Node* expand ();
956                 [CCode (cname = "xmlTextReaderGetAttribute")]
957                 public string get_attribute (string name);
959                 [CCode (cname = "xmlTextReaderGetAttributeNo")]
960                 public string get_attribute_no (int no);
962                 [CCode (cname = "xmlTextReaderGetAttributeNs")]
963                 public string get_attribute_ns (string local_name, string namespace_uri);
965                 [CCode (cname = "xmlTextReaderGetErrorHandler")]
966                 public void get_error_handler (out TextReaderErrorFunc f, void** arg);
968                 [CCode (cname = "xmlTextReaderGetParserColumnNumber")]
969                 public int get_parser_column_number ();
971                 [CCode (cname = "xmlTextReaderGetParserLineNumber")]
972                 public int get_parser_line_number ();
974                 [CCode (cname = "xmlTextReaderGetParserProp")]
975                 public int get_parser_prop (int prop);
977                 [CCode (cname = "xmlTextReaderHasAttributes")]
978                 public int has_attributes ();
980                 [CCode (cname = "xmlTextReaderHasValue")]
981                 public int has_value ();
983                 [CCode (cname = "xmlTextReaderIsDefault")]
984                 public int is_default ();
986                 [CCode (cname = "xmlTextReaderIsEmptyElement")]
987                 public int is_empty_element ();
989                 [CCode (cname = "xmlTextReaderIsNamespaceDecl")]
990                 public int is_namespace_decl ();
992                 [CCode (cname = "xmlTextReaderIsValid")]
993                 public int is_valid ();
995                 [CCode (cname = "xmlTextReaderLocalName")]
996                 public string local_name ();
998                 [CCode (cname = "xmlTextReaderLookupNamespace")]
999                 public string lookup_namespace (string prefix);
1001                 [CCode (cname = "xmlTextReaderMoveToAttribute")]
1002                 public int move_to_attribute (string name);
1004                 [CCode (cname = "xmlTextReaderMoveToAttributeNo")]
1005                 public int move_to_attribute_no (int no);
1007                 [CCode (cname = "xmlTextReaderMoveToAttributeNs")]
1008                 public int move_to_attribute_ns (string local_name, string namespace_uri);
1010                 [CCode (cname = "xmlTextReaderMoveToElement")]
1011                 public int move_to_element ();
1013                 [CCode (cname = "xmlTextReaderMoveToFirstAttribute")]
1014                 public int move_to_first_attribute ();
1016                 [CCode (cname = "xmlTextReaderMoveToNextAttribute")]
1017                 public int move_to_next_attribute ();
1019                 [CCode (cname = "xmlTextReaderName")]
1020                 public string name ();
1022                 [CCode (cname = "xmlTextReaderNamespaceUri")]
1023                 public string namespace_uri ();
1025                 [CCode (cname = "xmlTextReaderNext")]
1026                 public int next ();
1028                 [CCode (cname = "xmlTextReaderNextSibling")]
1029                 public int next_sibling ();
1031                 [CCode (cname = "xmlTextReaderNodeType")]
1032                 public int node_type ();
1034                 [CCode (cname = "xmlTextReaderNormalization")]
1035                 public int normalization ();
1037                 [CCode (cname = "xmlTextReaderPrefix")]
1038                 public string prefix ();
1040                 [CCode (cname = "xmlTextReaderPreserve")]
1041                 public Node* preserve ();
1043                 [CCode (cname = "xmlTextReaderPreservePattern")]
1044                 public int preserve_pattern (string pattern, [CCode (array_length = false)] string[] namespaces);
1046                 [CCode (cname = "xmlTextReaderQuoteChar")]
1047                 public int quote_char ();
1049                 [CCode (cname = "xmlTextReaderRead")]
1050                 public int read ();
1052                 [CCode (cname = "xmlTextReaderReadAttributeValue")]
1053                 public int read_attribute_value ();
1055                 [CCode (cname = "xmlTextReaderReadInnerXml")]
1056                 public string read_inner_xml ();
1058                 [CCode (cname = "xmlTextReaderReadOuterXml")]
1059                 public string read_outer_xml ();
1061                 [CCode (cname = "xmlTextReaderReadState")]
1062                 public int read_state ();
1064                 [CCode (cname = "xmlTextReaderReadString")]
1065                 public string read_string ();
1067                 [CCode (cname = "xmlTextReaderSchemaValidate")]
1068                 public int schema_validate (string xsd);
1070                 [CCode (cname = "xmlTextReaderSchemaValidateCtxt")]
1071                 public int schema_validate_ctxt (SchemaValidCtxt* ctxt, int options);
1073                 [CCode (cname = "xmlTextReaderSetErrorHandler")]
1074                 public void set_error_handler (TextReaderErrorFunc f, void* arg);
1076                 [CCode (cname = "xmlTextReaderSetParserProp")]
1077                 public int set_parser_prop (SchemaValidCtxt* ctxt, int options);
1079                 [CCode (cname = "xmlTextReaderStandalone")]
1080                 public int standalone ();
1082                 [CCode (cname = "xmlTextReaderValue")]
1083                 public string value ();
1085                 [CCode (cname = "xmlTextReaderXmlLang")]
1086                 public string xml_lang ();
1087         }
1089         [Compact]
1090         [CCode (cname = "void", cheader_filename = "libxml/xmlreader.h")]
1091         public class TextReaderLocator {
1092         }
1094         [CCode (cname = "xmlTextReaderMode", cprefix = "XML_TEXTREADER_MODE_", cheader_filename = "libxml/xmlreader.h")]
1095         public enum TextReaderMode {
1096                 INITIAL,
1097                 INTERACTIVE,
1098                 ERROR,
1099                 EOF,
1100                 CLOSED,
1101                 READING
1102         }
1104         public static delegate void TextReaderErrorFunc (void* arg, string msg, ParserSeverities severity, TextReaderLocator* locator);
1107         /* xpath - XML Path Language implementation */
1109         [CCode (cheader_filename = "libxml/xpath.h")]
1110         namespace XPath {
1111                 [CCode (cname = "xmlXPathOrderDocElems")]
1112                 public static long order_doc_elements (Doc* doc);
1113         }
1115         [Compact]
1116         [CCode (cname = "xmlNodeSet", cheader_filename = "libxml/xpath.h")]
1117         public class NodeSet {
1118                 [CCode (cname = "xmlXPathNodeSetGetLength")]
1119                 public int length ();
1121                 [CCode (cname = "xmlXPathNodeSetIsEmpty")]
1122                 public bool is_empty ();
1124                 [CCode (cname = "xmlXPathNodeSetItem")]
1125                 public Node* item (int index);
1126         }
1128         [Compact]
1129         [CCode (cname = "xmlXPathContext", free_function = "xmlXPathFreeContext", cheader_filename = "libxml/xpath.h")]
1130         public class XPathContext {
1131                 public Doc* doc;
1132                 public Node* node;
1134                 [CCode (cname = "xmlXPathContextSetCache")]
1135                 public int set_cache (int active, int value, int options);
1137                 [CCode (cname = "xmlXPathEval", instance_pos = -1)]
1138                 public XPathObject* eval (string str);
1140                 [CCode (cname = "xmlXPathEvalExpression", instance_pos = -1)]
1141                 public XPathObject* eval_expression (string str);
1143                 [CCode (cname = "xmlXPathRegisterNs")]
1144                 public int register_ns (string prefix, string ns_uri);
1146                 [CCode (cname = "xmlXPathNewContext")]
1147                 public XPathContext (Doc* doc);
1148         }
1150         [CCode (cname = "xmlXPathError", cprefix = "", cheader_filename = "libxml/xpath.h")]
1151         public enum XPathError {
1152                 XPATH_EXPRESSION_OK,
1153                 XPATH_NUMBER_ERROR,
1154                 XPATH_UNFINISHED_LITERAL_ERROR,
1155                 XPATH_START_LITERAL_ERROR,
1156                 XPATH_VARIABLE_REF_ERROR,
1157                 XPATH_UNDEF_VARIABLE_ERROR,
1158                 XPATH_INVALID_PREDICATE_ERROR,
1159                 XPATH_EXPR_ERROR,
1160                 XPATH_UNCLOSED_ERROR,
1161                 XPATH_UNKNOWN_FUNC_ERROR,
1162                 XPATH_INVALID_OPERAND,
1163                 XPATH_INVALID_TYPE,
1164                 XPATH_INVALID_ARITY,
1165                 XPATH_INVALID_CTXT_SIZE,
1166                 XPATH_INVALID_CTXT_POSITION,
1167                 XPATH_MEMORY_ERROR,
1168                 XPTR_SYNTAX_ERROR,
1169                 XPTR_RESOURCE_ERROR,
1170                 XPTR_SUB_RESOURCE_ERROR,
1171                 XPATH_UNDEF_PREFIX_ERROR,
1172                 XPATH_ENCODING_ERROR,
1173                 XPATH_INVALID_CHAR_ERROR,
1174                 XPATH_INVALID_CTXT
1175         }
1177         [Compact]
1178         [CCode (cname = "xmlXPathObject", cheader_filename = "libxml/xpath.h")]
1179         public class XPathObject {
1180                 public XPathObjectType type;
1181                 public NodeSet* nodesetval;
1182                 public int boolval;
1183                 public double floatval;
1184                 public string stringval;
1185                 public void* user;
1186                 public int index;
1187                 public void* user2;
1188                 public int index2;
1189         }
1191         [CCode (cname = "xmlXPathObjectType", cprefix = "XPATH_", cheader_filename = "libxml/xpath.h")]
1192         public enum XPathObjectType {
1193                 UNDEFINED,
1194                 NODESET,
1195                 BOOLEAN,
1196                 NUMBER,
1197                 STRING,
1198                 POINT,
1199                 RANGE,
1200                 LOCATIONSET,
1201                 USERS,
1202                 XSLT_TREE
1203         }
1206         /* SAX CALLBACKS */
1208         [CCode (cname = "attributeDeclSAXFunc")]
1209         public static delegate void attributeDeclSAXFunc (void* ctx, string elem, string fullname, int type, int def, string defaultValue, Enumeration* tree);
1211         [CCode (cname = "attributeSAXFunc")]
1212         public static delegate void attributeSAXFunc (void* ctx, string name, string value);
1214         [CCode (cname = "cdataBlockSAXFunc")]
1215         public static delegate void cdataBlockSAXFunc (void* ctx, string value, int len);
1217         [CCode (cname = "charactersSAXFunc")]
1218         public static delegate void charactersSAXFunc (void* ctx, string ch, int len);
1220         [CCode (cname = "commentsSAXFunc")]
1221         public static delegate void commentSAXFunc (void* ctx, string value);
1223         [CCode (cname = "elementDeclSAXFunc")]
1224         public static delegate void elementDeclSAXFunc (void* ctx, string name, int type, ElementContent content);
1226         [CCode (cname = "endDocumentSAXFunc")]
1227         public static delegate void endDocumentSAXFunc (void* ctx);
1229         [CCode (cname = "endElementNsSAX2Func")]
1230         public static delegate void endElementNsSAX2Func (void* ctx, string localname, string prefix, string URI);
1232         [CCode (cname = "endElementSAXFunc")]
1233         public static delegate void endElementSAXFunc (void* ctx, string name);
1235         [CCode (cname = "entityDeclSAXFunc")]
1236         public static delegate void entityDeclSAXFunc (void* ctx, string name, int type, string publicId, string systemId, string content);
1238         [CCode (cname = "errorSAXFunc")]
1239         public static delegate void errorSAXFunc (void* ctx, string msg, ...);
1241         [CCode (cname = "externalSubsetSAXFunc")]
1242         public static delegate void externalSubsetSAXFunc (void* ctx, string name, string ExternalID, string SystemID);
1244         [CCode (cname = "fatalErrorSAXFunc")]
1245         public static delegate void fatalErrorSAXFunc (void* ctx, string msg, ...);
1247         [CCode (cname = "getEntitySAXFunc")]
1248         public static delegate Entity* getEntitySAXFunc (void* ctx, string name);
1250         [CCode (cname = "getParameterEntitySAXFunc")]
1251         public static delegate Entity* getParameterEntitySAXFunc (void* ctx, string name);
1253         [CCode (cname = "hasExternalSubsetSAXFunc")]
1254         public static delegate int hasExternalSubsetSAXFunc (void* ctx);
1256         [CCode (cname = "hasInternalSubsetSAXFunc")]
1257         public static delegate int hasInternalSubsetSAXFunc (void* ctx);
1259         [CCode (cname = "ignorableWhitespaceSAXFunc")]
1260         public static delegate void ignorableWhitespaceSAXFunc (void* ctx, string ch, int len);
1262         [CCode (cname = "internalSubsetSAXFunc")]
1263         public static delegate void internalSubsetSAXFunc (void* ctx, string name, string ExternalID, string SystemID);
1265         [CCode (cname = "isStandaloneSAXFunc")]
1266         public static delegate int isStandaloneSAXFunc (void* ctx);
1268         [CCode (cname = "notationDeclSAXFunc")]
1269         public static delegate void notationDeclSAXFunc (void* ctx, string name, string publicId, string systemId);
1271         [CCode (cname = "processingInstructionSAXFunc")]
1272         public static delegate void processingInstructionSAXFunc (void* ctx, string target, string data);
1274         [CCode (cname = "referenceSAXFunc")]
1275         public static delegate void referenceSAXFunc (void* ctx, string name);
1277         // [CCode (cname = "resolveEntitySAXFunc")]
1278         // public static delegate ParserInput resolveEntitySAXFunc (void* ctx, string publicId, string systemId);
1280         // [CCode (cname = "setDocumentLocatorSAXFunc")]
1281         // public static delegate void setDocumentLocatorSAXFunc (void* ctx, SAXLocator loc);
1283         [CCode (cname = "startDocumentSAXFunc")]
1284         public static delegate void startDocumentSAXFunc (void* ctx);
1286         [CCode (cname = "startElementNsSAX2Func")]
1287         public static delegate void startElementNsSAX2Func (void* ctx, string localname, string prefix, string URI, int nb_namespaces, [CCode (array_length = false)] string[] namespaces, int nb_attributes, int nb_defaulted, [CCode (array_length = false)] string[] attributes);
1289         [CCode (cname = "startElementSAXFunc")]
1290         public static delegate void startElementSAXFunc (void* ctx, string name, [CCode (array_length = false)] string[] atts);
1292         [CCode (cname = "unparsedEntityDeclSAXFunc")]
1293         public static delegate void unparsedEntityDeclSAXFunc (void* ctx, string name, string publicId, string systemId, string notationName);
1295         [CCode (cname = "warningSAXFunc")]
1296         public static delegate void warningSAXFunc (void* ctx, string msg, ...);
1298         [CCode (cname ="xmlStructuredErrorFunc")]
1299         public static delegate void xmlStructuredErrorFunc (void* ctx, Error* error);
1301         [Compact]
1302         [CCode (cname = "xmlSAXHandler")]
1303         public struct SAXHandler {
1304                 public internalSubsetSAXFunc internalSubset;
1305                 public isStandaloneSAXFunc isStandalone;
1306                 public hasInternalSubsetSAXFunc hasInternalSubset;
1307                 public hasExternalSubsetSAXFunc hasExternalSubset;
1308                 // public resolveEntitySAXFunc resolveEntity;
1309                 public getEntitySAXFunc getEntity;
1310                 public entityDeclSAXFunc entityDecl;
1311                 public notationDeclSAXFunc notationDecl;
1312                 public attributeDeclSAXFunc attributeDecl;
1313                 public elementDeclSAXFunc elementDecl;
1314                 public unparsedEntityDeclSAXFunc unparsedEntityDecl;
1315                 // public setDocumentLocatorSAXFunc setDocumentLocator;
1316                 public startDocumentSAXFunc startDocument;
1317                 public endDocumentSAXFunc endDocument;
1318                 public startElementSAXFunc startElement;
1319                 public endElementSAXFunc endElement;
1320                 public referenceSAXFunc reference;
1321                 public charactersSAXFunc characters;
1322                 public ignorableWhitespaceSAXFunc ignorableWhitespace;
1323                 public processingInstructionSAXFunc processingInstruction;
1324                 public commentSAXFunc comment;
1325                 public warningSAXFunc warning;
1326                 public errorSAXFunc error;
1327                 public fatalErrorSAXFunc  fatalError;
1328                 public getParameterEntitySAXFunc getParameterEntity;
1329                 public cdataBlockSAXFunc cdataBlock;
1330                 public externalSubsetSAXFunc externalSubset;
1331                 public uint initialized;
1332                 public startElementNsSAX2Func startElementNs;
1333                 public endElementNsSAX2Func endElementNs;
1334                 public xmlStructuredErrorFunc serror;
1335         }
1337         [CCode (lower_case_cprefix = "xmlSAX")]
1338         namespace SAXParser {
1339                 public int UserParseMemory (SAXHandler* sax, void* user_data, string buffer, int size);
1340                 public int UserParseFile (SAXHandler* sax, void* user_data, string filename);
1341         }
1344         /* xmlerror - error handling */
1346         [Compact]
1347         [CCode (cname = "xmlError", cheader_filename = "libxml/xmlerror.h")]
1348         public struct Error {
1349                 public int domain;
1350                 public int code;
1351                 public string message;
1352                 public ErrorLevel level;
1353                 public string file;
1354                 public int line;
1355                 public string str1;
1356                 public string str2;
1357                 public string str3;
1358                 public int int1;
1359                 public int int2;
1360                 public void* ctx;
1361                 public void* node;
1362         }
1364         [CCode (cname = "xmlErrorLevel", cprefix = "XML_ERR_", cheader_filename = "libxml/xmlerror.h")]
1365         public enum ErrorLevel {
1366                 NONE = 0,
1367                 WARNING = 1,
1368                 ERROR = 2,
1369                 FATAL = 3
1370         }