Ignore BusName sender parameters in marshalling code
[vala-lang.git] / vapi / libxml-2.0.vapi
blob43faf14824eb9730532c4ee2dea454109c0d2bb6
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, 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);
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, 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                 public Ns next;
723                 public ElementType type;
724                 public string href;
725                 public string prefix;
726                 public Doc context;
727         }
729         [Compact]
730         [CCode (cname = "xmlParserCtxt")]
731         public class ParserCtxt {
732                 public SAXHandler* sax;
733                 public void* user_data;
735                 [CCode (cname = "xmlParseDocument")]
736                 public int parse_document ();
737         }
740         /* uri - library of generic URI related routines */
742         [Compact]
743         [CCode (cname = "xmlURI", free_function = "xmlFreeURI", cheader_filename = "libxml/uri.h")]
744         public class URI {
745                 [CCode (cname = "xmlBuildRelativeURI")]
746                 public static string build_relative (string uri, string @base);
748                 [CCode (cname = "xmlBuildURI")]
749                 public static string build (string URI, string @base);
751                 [CCode (cname = "xmlCanonicPath")]
752                 public static string canonic_path (string path);
754                 [CCode (cname = "xmlCreateURI")]
755                 public URI ();
757                 [CCode (cname = "xmlNormalizeURIPath")]
758                 public static int normalize_uri_path (string path);
760                 [CCode (cname = "xmlParseURI")]
761                 public static URI parse (string str);
763                 [CCode (cname = "xmlParseURIRaw")]
764                 public static URI parse_raw (string str, int raw);
766                 [CCode (cname = "xmlParseURIReference")]
767                 public int parse_reference (string str);
769                 [CCode (cname = "xmlPathToURI")]
770                 public static string path_to_uri (string path);
772                 [CCode (cname = "xmlPrintURI", instance_pos = -1)]
773                 public void print (GLib.FileStream stream);
775                 [CCode (cname = "xmlSaveUri")]
776                 public string save ();
778                 [CCode (cname = "xmlURIEscape")]
779                 public static string escape (string str);
781                 [CCode (cname = "xmlURIEscapeStr")]
782                 public static string escape_str (string str, string list);
784                 [CCode (cname = "xmlURIUnescapeString")]
785                 public static string unescape_string (string str, int len, string? target);
787                 public string scheme;
788                 public string opaque;
789                 public string authority;
790                 public string server;
791                 public string user;
792                 public int port;
793                 public string path;
794                 public string query;
795                 public string fragment;
796                 public int cleanup;
797                 public string query_raw;
798         }
801         /* xmlIO - interface for the I/O interfaces used by the parser */
803         [CCode (cname = "xmlInputCloseCallback", cheader_filename = "libxml/xmlIO.h")]
804         public static delegate int InputCloseCallback (void* context);
806         [CCode (cname = "xmlInputReadCallback", cheader_filename = "libxml/xmlIO.h")]
807         public static delegate int InputReadCallback (void* context, [CCode (array_length = false)] char[] buffer, int len);
810         /* xmlschemas - incomplete XML Schemas structure implementation */
812         [Compact]
813         [CCode (cname = "xmlSchemaValidCtxt", cheader_filename = "libxml/xmlreader.h")]
814         public class SchemaValidCtxt {
815         }
818         /* xmlreader - the XMLReader implementation */
820         [CCode (cname = "xmlParserProperties", cprefix = "XML_PARSER_", cheader_filename = "libxml/xmlreader.h")]
821         public enum ParserProperties {
822                 LOADDTD,
823                 DEFAULTATTRS,
824                 VALIDATE,
825                 SUBST_ENTITIES
826         }
828         [CCode (cname = "xmlParserSeverities", cprefix = "XML_PARSER_SEVERITY_", cheader_filename = "libxml/xmlreader.h")]
829         public enum ParserSeverities {
830                 VALIDITY_WARNING,
831                 VALIDITY_ERROR,
832                 WARNING,
833                 ERROR
834         }
836         [CCode (cname = "xmlReaderTypes",  cheader_filename = "libxml/xmlreader.h")]
837         public enum ReaderType {
838                 NONE,
839                 ELEMENT,
840                 ATTRIBUTE,
841                 TEXT,
842                 CDATA,
843                 ENTITY_REFERENCE,
844                 ENTITY,
845                 PROCESSING_INSTRUCTION,
846                 COMMENT,
847                 DOCUMENT,
848                 DOCUMENT_TYPE,
849                 DOCUMENT_FRAGMENT,
850                 NOTATION,
851                 WHITESPACE,
852                 SIGNIFICANT_WHITESPACE,
853                 END_ELEMENT,
854                 END_ENTITY,
855                 XML_DECLARATION
856         }
858         [Compact]
859         [CCode (cname = "xmlTextReader", free_function = "xmlFreeTextReader", cheader_filename = "libxml/xmlreader.h")]
860         public class TextReader {
861                 [CCode (cname = "xmlNewTextReaderFilename")]
862                 public TextReader.filename (string uri);
864                 [CCode (cname = "xmlReaderForDoc")]
865                 public TextReader.for_doc (string cur, string url, string? encoding, int options);
867                 [CCode (cname = "xmlReaderForFd")]
868                 public TextReader.for_fd (int fd, string url, string? encoding, int options);
870                 [CCode (cname = "xmlReaderForFile")]
871                 public TextReader.for_file (string filename, string? encoding, int options);
873                 [CCode (cname = "xmlReaderForIO")]
874                 public TextReader.for_io (InputReadCallback ioread, InputCloseCallback ioclose, void* ioctx, string url, string encoding, int options);
876                 [CCode (cname = "xmlReaderForMemory")]
877                 public TextReader.for_memory ([CCode (array_length = false)] char[] buffer, int size, string url, string encoding, int options);
879                 [CCode (cname = "xmlReaderNewDoc")]
880                 public int new_doc (string cur, string url, string? encoding, int options);
882                 [CCode (cname = "xmlReaderNewFd")]
883                 public int new_fd (int fd, string url, string? encoding, int options);
885                 [CCode (cname = "xmlReaderNewFile")]
886                 public int new_file (string filename, string? encoding, int options);
888                 [CCode (cname = "xmlReaderNewIO")]
889                 public int new_io (InputReadCallback ioread, InputCloseCallback ioclose, void* ioctx, string url, string encoding, int options);
891                 [CCode (cname = "xmlReaderNewMemory")]
892                 public int new_memory ([CCode (array_length = false)] char[] buffer, int size, string url, string? encoding, int options);
894                 [CCode (cname = "xmlReaderNewWalker")]
895                 public int new_walker (Doc* doc);
897                 [CCode (cname = "xmlReaderWalker")]
898                 public TextReader.walker (Doc* doc);
900                 [CCode (cname = "xmlTextReaderAttributeCount")]
901                 public int attribute_count ();
903                 [CCode (cname = "xmlTextReaderBaseUri")]
904                 public string base_uri ();
906                 [CCode (cname = "xmlTextReaderByteConsumed")]
907                 public long byte_consumed ();
909                 [CCode (cname = "xmlTextReaderClose")]
910                 public int close ();
912                 [CCode (cname = "xmlTextReaderConstBaseUri")]
913                 public weak string const_base_uri ();
915                 [CCode (cname = "xmlTextReaderConstEncoding")]
916                 public weak string const_encoding ();
918                 [CCode (cname = "xmlTextReaderConstLocalName")]
919                 public weak string const_local_name ();
921                 [CCode (cname = "xmlTextReaderConstName")]
922                 public weak string const_name ();
924                 [CCode (cname = "xmlTextReaderConstNamespaceUri")]
925                 public weak string const_namespace_uri ();
927                 [CCode (cname = "xmlTextReaderConstPrefix")]
928                 public weak string const_prefix ();
930                 [CCode (cname = "xmlTextReaderConstString")]
931                 public weak string const_string (string str);
933                 [CCode (cname = "xmlTextReaderConstValue")]
934                 public weak string const_value ();
936                 [CCode (cname = "xmlTextReaderConstXmlLang")]
937                 public weak string const_xml_lang ();
939                 [CCode (cname = "xmlTextReaderConstXmlVersion")]
940                 public weak string const_xml_version ();
942                 [CCode (cname = "xmlTextReaderCurrentDoc")]
943                 public Doc* current_doc ();
945                 [CCode (cname = "xmlTextReaderCurrentNode")]
946                 public Node* current_node ();
948                 [CCode (cname = "xmlTextReaderDepth")]
949                 public int depth ();
951                 [CCode (cname = "xmlTextReaderExpand")]
952                 public Node* expand ();
954                 [CCode (cname = "xmlTextReaderGetAttribute")]
955                 public string get_attribute (string name);
957                 [CCode (cname = "xmlTextReaderGetAttributeNo")]
958                 public string get_attribute_no (int no);
960                 [CCode (cname = "xmlTextReaderGetAttributeNs")]
961                 public string get_attribute_ns (string local_name, string namespace_uri);
963                 [CCode (cname = "xmlTextReaderGetErrorHandler")]
964                 public void get_error_handler (out TextReaderErrorFunc f, void** arg);
966                 [CCode (cname = "xmlTextReaderGetParserColumnNumber")]
967                 public int get_parser_column_number ();
969                 [CCode (cname = "xmlTextReaderGetParserLineNumber")]
970                 public int get_parser_line_number ();
972                 [CCode (cname = "xmlTextReaderGetParserProp")]
973                 public int get_parser_prop (int prop);
975                 [CCode (cname = "xmlTextReaderHasAttributes")]
976                 public int has_attributes ();
978                 [CCode (cname = "xmlTextReaderHasValue")]
979                 public int has_value ();
981                 [CCode (cname = "xmlTextReaderIsDefault")]
982                 public int is_default ();
984                 [CCode (cname = "xmlTextReaderIsEmptyElement")]
985                 public int is_empty_element ();
987                 [CCode (cname = "xmlTextReaderIsNamespaceDecl")]
988                 public int is_namespace_decl ();
990                 [CCode (cname = "xmlTextReaderIsValid")]
991                 public int is_valid ();
993                 [CCode (cname = "xmlTextReaderLocalName")]
994                 public string local_name ();
996                 [CCode (cname = "xmlTextReaderLookupNamespace")]
997                 public string lookup_namespace (string prefix);
999                 [CCode (cname = "xmlTextReaderMoveToAttribute")]
1000                 public int move_to_attribute (string name);
1002                 [CCode (cname = "xmlTextReaderMoveToAttributeNo")]
1003                 public int move_to_attribute_no (int no);
1005                 [CCode (cname = "xmlTextReaderMoveToAttributeNs")]
1006                 public int move_to_attribute_ns (string local_name, string namespace_uri);
1008                 [CCode (cname = "xmlTextReaderMoveToElement")]
1009                 public int move_to_element ();
1011                 [CCode (cname = "xmlTextReaderMoveToFirstAttribute")]
1012                 public int move_to_first_attribute ();
1014                 [CCode (cname = "xmlTextReaderMoveToNextAttribute")]
1015                 public int move_to_next_attribute ();
1017                 [CCode (cname = "xmlTextReaderName")]
1018                 public string name ();
1020                 [CCode (cname = "xmlTextReaderNamespaceUri")]
1021                 public string namespace_uri ();
1023                 [CCode (cname = "xmlTextReaderNext")]
1024                 public int next ();
1026                 [CCode (cname = "xmlTextReaderNextSibling")]
1027                 public int next_sibling ();
1029                 [CCode (cname = "xmlTextReaderNodeType")]
1030                 public int node_type ();
1032                 [CCode (cname = "xmlTextReaderNormalization")]
1033                 public int normalization ();
1035                 [CCode (cname = "xmlTextReaderPrefix")]
1036                 public string prefix ();
1038                 [CCode (cname = "xmlTextReaderPreserve")]
1039                 public Node* preserve ();
1041                 [CCode (cname = "xmlTextReaderPreservePattern")]
1042                 public int preserve_pattern (string pattern, [CCode (array_length = false)] string[] namespaces);
1044                 [CCode (cname = "xmlTextReaderQuoteChar")]
1045                 public int quote_char ();
1047                 [CCode (cname = "xmlTextReaderRead")]
1048                 public int read ();
1050                 [CCode (cname = "xmlTextReaderReadAttributeValue")]
1051                 public int read_attribute_value ();
1053                 [CCode (cname = "xmlTextReaderReadInnerXml")]
1054                 public string read_inner_xml ();
1056                 [CCode (cname = "xmlTextReaderReadOuterXml")]
1057                 public string read_outer_xml ();
1059                 [CCode (cname = "xmlTextReaderReadState")]
1060                 public int read_state ();
1062                 [CCode (cname = "xmlTextReaderReadString")]
1063                 public string read_string ();
1065                 [CCode (cname = "xmlTextReaderSchemaValidate")]
1066                 public int schema_validate (string xsd);
1068                 [CCode (cname = "xmlTextReaderSchemaValidateCtxt")]
1069                 public int schema_validate_ctxt (SchemaValidCtxt* ctxt, int options);
1071                 [CCode (cname = "xmlTextReaderSetErrorHandler")]
1072                 public void set_error_handler (TextReaderErrorFunc f, void* arg);
1074                 [CCode (cname = "xmlTextReaderSetParserProp")]
1075                 public int set_parser_prop (SchemaValidCtxt* ctxt, int options);
1077                 [CCode (cname = "xmlTextReaderStandalone")]
1078                 public int standalone ();
1080                 [CCode (cname = "xmlTextReaderValue")]
1081                 public string value ();
1083                 [CCode (cname = "xmlTextReaderXmlLang")]
1084                 public string xml_lang ();
1085         }
1087         [Compact]
1088         [CCode (cname = "void", cheader_filename = "libxml/xmlreader.h")]
1089         public class TextReaderLocator {
1090         }
1092         [CCode (cname = "xmlTextReaderMode", cprefix = "XML_TEXTREADER_MODE_", cheader_filename = "libxml/xmlreader.h")]
1093         public enum TextReaderMode {
1094                 INITIAL,
1095                 INTERACTIVE,
1096                 ERROR,
1097                 EOF,
1098                 CLOSED,
1099                 READING
1100         }
1102         public static delegate void TextReaderErrorFunc (void* arg, string msg, ParserSeverities severity, TextReaderLocator* locator);
1105         /* xpath - XML Path Language implementation */
1107         [CCode (cheader_filename = "libxml/xpath.h")]
1108         namespace XPath {
1109                 [CCode (cname = "xmlXPathOrderDocElems")]
1110                 public static long order_doc_elements (Doc* doc);
1111         }
1113         [Compact]
1114         [CCode (cname = "xmlNodeSet", cheader_filename = "libxml/xpath.h")]
1115         public class NodeSet {
1116                 [CCode (cname = "xmlXPathNodeSetGetLength")]
1117                 public int length ();
1119                 [CCode (cname = "xmlXPathNodeSetIsEmpty")]
1120                 public bool is_empty ();
1122                 [CCode (cname = "xmlXPathNodeSetItem")]
1123                 public Node* item (int index);
1124         }
1126         [Compact]
1127         [CCode (cname = "xmlXPathContext", free_function = "xmlXPathFreeContext", cheader_filename = "libxml/xpath.h")]
1128         public class XPathContext {
1129                 public Doc* doc;
1130                 public Node* node;
1132                 [CCode (cname = "xmlXPathContextSetCache")]
1133                 public int set_cache (int active, int value, int options);
1135                 [CCode (cname = "xmlXPathEval", instance_pos = -1)]
1136                 public XPathObject* eval (string str);
1138                 [CCode (cname = "xmlXPathEvalExpression", instance_pos = -1)]
1139                 public XPathObject* eval_expression (string str);
1141                 [CCode (cname = "xmlXPathNewContext")]
1142                 public XPathContext (Doc* doc);
1143         }
1145         [CCode (cname = "xmlXPathError", cprefix = "", cheader_filename = "libxml/xpath.h")]
1146         public enum XPathError {
1147                 XPATH_EXPRESSION_OK,
1148                 XPATH_NUMBER_ERROR,
1149                 XPATH_UNFINISHED_LITERAL_ERROR,
1150                 XPATH_START_LITERAL_ERROR,
1151                 XPATH_VARIABLE_REF_ERROR,
1152                 XPATH_UNDEF_VARIABLE_ERROR,
1153                 XPATH_INVALID_PREDICATE_ERROR,
1154                 XPATH_EXPR_ERROR,
1155                 XPATH_UNCLOSED_ERROR,
1156                 XPATH_UNKNOWN_FUNC_ERROR,
1157                 XPATH_INVALID_OPERAND,
1158                 XPATH_INVALID_TYPE,
1159                 XPATH_INVALID_ARITY,
1160                 XPATH_INVALID_CTXT_SIZE,
1161                 XPATH_INVALID_CTXT_POSITION,
1162                 XPATH_MEMORY_ERROR,
1163                 XPTR_SYNTAX_ERROR,
1164                 XPTR_RESOURCE_ERROR,
1165                 XPTR_SUB_RESOURCE_ERROR,
1166                 XPATH_UNDEF_PREFIX_ERROR,
1167                 XPATH_ENCODING_ERROR,
1168                 XPATH_INVALID_CHAR_ERROR,
1169                 XPATH_INVALID_CTXT
1170         }
1172         [Compact]
1173         [CCode (cname = "xmlXPathObject", cheader_filename = "libxml/xpath.h")]
1174         public class XPathObject {
1175                 public XPathObjectType type;
1176                 public NodeSet* nodesetval;
1177                 public int boolval;
1178                 public double floatval;
1179                 public string stringval;
1180                 public void* user;
1181                 public int index;
1182                 public void* user2;
1183                 public int index2;
1184         }
1186         [CCode (cname = "xmlXPathObjectType", cprefix = "XPATH_", cheader_filename = "libxml/xpath.h")]
1187         public enum XPathObjectType {
1188                 UNDEFINED,
1189                 NODESET,
1190                 BOOLEAN,
1191                 NUMBER,
1192                 STRING,
1193                 POINT,
1194                 RANGE,
1195                 LOCATIONSET,
1196                 USERS,
1197                 XSLT_TREE
1198         }
1201         /* SAX CALLBACKS */
1203         [CCode (cname = "attributeDeclSAXFunc")]
1204         public static delegate void attributeDeclSAXFunc (void* ctx, string elem, string fullname, int type, int def, string defaultValue, Enumeration* tree);
1206         [CCode (cname = "attributeSAXFunc")]
1207         public static delegate void attributeSAXFunc (void* ctx, string name, string value);
1209         [CCode (cname = "cdataBlockSAXFunc")]
1210         public static delegate void cdataBlockSAXFunc (void* ctx, string value, int len);
1212         [CCode (cname = "charactersSAXFunc")]
1213         public static delegate void charactersSAXFunc (void* ctx, string ch, int len);
1215         [CCode (cname = "commentsSAXFunc")]
1216         public static delegate void commentSAXFunc (void* ctx, string value);
1218         [CCode (cname = "elementDeclSAXFunc")]
1219         public static delegate void elementDeclSAXFunc (void* ctx, string name, int type, ElementContent content);
1221         [CCode (cname = "endDocumentSAXFunc")]
1222         public static delegate void endDocumentSAXFunc (void* ctx);
1224         [CCode (cname = "endElementNsSAX2Func")]
1225         public static delegate void endElementNsSAX2Func (void* ctx, string localname, string prefix, string URI);
1227         [CCode (cname = "endElementSAXFunc")]
1228         public static delegate void endElementSAXFunc (void* ctx, string name);
1230         [CCode (cname = "entityDeclSAXFunc")]
1231         public static delegate void entityDeclSAXFunc (void* ctx, string name, int type, string publicId, string systemId, string content);
1233         [CCode (cname = "errorSAXFunc")]
1234         public static delegate void errorSAXFunc (void* ctx, string msg, ...);
1236         [CCode (cname = "externalSubsetSAXFunc")]
1237         public static delegate void externalSubsetSAXFunc (void* ctx, string name, string ExternalID, string SystemID);
1239         [CCode (cname = "fatalErrorSAXFunc")]
1240         public static delegate void fatalErrorSAXFunc (void* ctx, string msg, ...);
1242         [CCode (cname = "getEntitySAXFunc")]
1243         public static delegate Entity* getEntitySAXFunc (void* ctx, string name);
1245         [CCode (cname = "getParameterEntitySAXFunc")]
1246         public static delegate Entity* getParameterEntitySAXFunc (void* ctx, string name);
1248         [CCode (cname = "hasExternalSubsetSAXFunc")]
1249         public static delegate int hasExternalSubsetSAXFunc (void* ctx);
1251         [CCode (cname = "hasInternalSubsetSAXFunc")]
1252         public static delegate int hasInternalSubsetSAXFunc (void* ctx);
1254         [CCode (cname = "ignorableWhitespaceSAXFunc")]
1255         public static delegate void ignorableWhitespaceSAXFunc (void* ctx, string ch, int len);
1257         [CCode (cname = "internalSubsetSAXFunc")]
1258         public static delegate void internalSubsetSAXFunc (void* ctx, string name, string ExternalID, string SystemID);
1260         [CCode (cname = "isStandaloneSAXFunc")]
1261         public static delegate int isStandaloneSAXFunc (void* ctx);
1263         [CCode (cname = "notationDeclSAXFunc")]
1264         public static delegate void notationDeclSAXFunc (void* ctx, string name, string publicId, string systemId);
1266         [CCode (cname = "processingInstructionSAXFunc")]
1267         public static delegate void processingInstructionSAXFunc (void* ctx, string target, string data);
1269         [CCode (cname = "referenceSAXFunc")]
1270         public static delegate void referenceSAXFunc (void* ctx, string name);
1272         // [CCode (cname = "resolveEntitySAXFunc")]
1273         // public static delegate ParserInput resolveEntitySAXFunc (void* ctx, string publicId, string systemId);
1275         // [CCode (cname = "setDocumentLocatorSAXFunc")]
1276         // public static delegate void setDocumentLocatorSAXFunc (void* ctx, SAXLocator loc);
1278         [CCode (cname = "startDocumentSAXFunc")]
1279         public static delegate void startDocumentSAXFunc (void* ctx);
1281         [CCode (cname = "startElementNsSAX2Func")]
1282         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);
1284         [CCode (cname = "startElementSAXFunc")]
1285         public static delegate void startElementSAXFunc (void* ctx, string name, [CCode (array_length = false)] string[] atts);
1287         [CCode (cname = "unparsedEntityDeclSAXFunc")]
1288         public static delegate void unparsedEntityDeclSAXFunc (void* ctx, string name, string publicId, string systemId, string notationName);
1290         [CCode (cname = "warningSAXFunc")]
1291         public static delegate void warningSAXFunc (void* ctx, string msg, ...);
1293         [CCode (cname ="xmlStructuredErrorFunc")]
1294         public static delegate void xmlStructuredErrorFunc (void* ctx, Error* error);
1296         [Compact]
1297         [CCode (cname = "xmlSAXHandler")]
1298         public struct SAXHandler {
1299                 public internalSubsetSAXFunc internalSubset;
1300                 public isStandaloneSAXFunc isStandalone;
1301                 public hasInternalSubsetSAXFunc hasInternalSubset;
1302                 public hasExternalSubsetSAXFunc hasExternalSubset;
1303                 // public resolveEntitySAXFunc resolveEntity;
1304                 public getEntitySAXFunc getEntity;
1305                 public entityDeclSAXFunc entityDecl;
1306                 public notationDeclSAXFunc notationDecl;
1307                 public attributeDeclSAXFunc attributeDecl;
1308                 public elementDeclSAXFunc elementDecl;
1309                 public unparsedEntityDeclSAXFunc unparsedEntityDecl;
1310                 // public setDocumentLocatorSAXFunc setDocumentLocator;
1311                 public startDocumentSAXFunc startDocument;
1312                 public endDocumentSAXFunc endDocument;
1313                 public startElementSAXFunc startElement;
1314                 public endElementSAXFunc endElement;
1315                 public referenceSAXFunc reference;
1316                 public charactersSAXFunc characters;
1317                 public ignorableWhitespaceSAXFunc ignorableWhitespace;
1318                 public processingInstructionSAXFunc processingInstruction;
1319                 public commentSAXFunc comment;
1320                 public warningSAXFunc warning;
1321                 public errorSAXFunc error;
1322                 public fatalErrorSAXFunc  fatalError;
1323                 public getParameterEntitySAXFunc getParameterEntity;
1324                 public cdataBlockSAXFunc cdataBlock;
1325                 public externalSubsetSAXFunc externalSubset;
1326                 public uint initialized;
1327                 public startElementNsSAX2Func startElementNs;
1328                 public endElementNsSAX2Func endElementNs;
1329                 public xmlStructuredErrorFunc serror;
1330         }
1332         [CCode (lower_case_cprefix = "xmlSAX")]
1333         namespace SAXParser {
1334                 public int UserParseMemory (SAXHandler* sax, void* user_data, string buffer, int size);
1335                 public int UserParseFile (SAXHandler* sax, void* user_data, string filename);
1336         }
1339         /* xmlerror - error handling */
1341         [Compact]
1342         [CCode (cname = "xmlError", cheader_filename = "libxml/xmlerror.h")]
1343         public struct Error {
1344                 public int domain;
1345                 public int code;
1346                 public string message;
1347                 public ErrorLevel level;
1348                 public string file;
1349                 public int line;
1350                 public string str1;
1351                 public string str2;
1352                 public string str3;
1353                 public int int1;
1354                 public int int2;
1355                 public void* ctx;
1356                 public void* node;
1357         }
1359         [CCode (cname = "xmlErrorLevel", cprefix = "XML_ERR_", cheader_filename = "libxml/xmlerror.h")]
1360         public enum ErrorLevel {
1361                 NONE = 0,
1362                 WARNING = 1,
1363                 ERROR = 2,
1364                 FATAL = 3
1365         }