3 * Copyright (C) 2006-2008 Jürg Billeter, Raffaele Sandrini, Michael Lawrence
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
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>
26 [CCode (gir_namespace = "libxml2", gir_version = "2.0")]
28 /* nanoftp - minimal FTP implementation */
30 [CCode (has_target = false, cname = "ftpDataCallback", cheader_filename = "libxml/nanoftp.h")]
31 public delegate void FtpDataCallback (void* userData, [CCode (array_length = false)] char[] data, int len);
33 [CCode (has_target = false, cname = "ftpListCallback", cheader_filename = "libxml/nanoftp.h")]
34 public 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);
37 [CCode (cname = "void", free_function = "xmlNanoFTPFreeCtxt", cheader_filename = "libxml/nanoftp.h")]
38 public class NanoFTP {
39 [CCode (cname = "xmlNanoFTPCheckResponse")]
40 public int check_response ();
42 [CCode (cname = "xmlNanoFTPCleanup")]
43 public static void cleanup ();
45 [CCode (cname = "xmlNanoFTPClose")]
48 [CCode (cname = "xmlNanoFTPCloseConnection")]
49 public int close_connection ();
51 [CCode (cname = "xmlNanoFTPConnect")]
52 public int connect ();
54 [CCode (cname = "xmlNanoFTPConnectTo")]
55 public static NanoFTP* connect_to (string server, int port);
57 [CCode (cname = "xmlNanoFTPCwd")]
58 public int cwd (string directory);
60 [CCode (cname = "xmlNanoFTPDele")]
61 public int dele (string file);
63 [CCode (cname = "xmlNanoFTPGet")]
64 public int get (FtpDataCallback cb, void* user_data, string filename);
66 [CCode (cname = "xmlNanoFTPGetConnection")]
67 public int get_connection ();
69 [CCode (cname = "xmlNanoFTPGetResponse")]
70 public int get_response ();
72 [CCode (cname = "xmlNanoFTPGetSocket")]
73 public int get_socket (string filename);
75 [CCode (cname = "xmlNanoFTPInit")]
76 public static void init ();
78 [CCode (cname = "xmlNanoFTPList")]
79 public int list (FtpListCallback cb, void* user_data, string filename);
81 [CCode (cname = "xmlNanoFTPNewCtxt")]
82 public NanoFTP (string url);
84 [CCode (cname = "xmlNanoFTPOpen")]
85 public static NanoFTP* open (string url);
87 [CCode (cname = "xmlNanoFTPProxy")]
88 public static void proxy (string host, int port, string user, string passwd, int type);
90 [CCode (cname = "xmlNanoFTPQuit")]
93 [CCode (cname = "xmlNanoFTPRead")]
94 public int read (void* dest, int len);
96 [CCode (cname = "xmlNanoFTPScanProxy")]
97 public static void scan_proxy (string url);
99 [CCode (cname = "xmlNanoFTPUpdateURL")]
100 public int update_url (string url);
104 /* nanohttp - minimal HTTP implementation */
107 [CCode (cname = "void", cheader_filename = "libxml/nanohttp.h")]
108 public class NanoHTTP {
109 [CCode (cname = "xmlNanoHTTPAuthHeader")]
110 public unowned string auth_header ();
112 [CCode (cname = "xmlNanoHTTPCleanup")]
113 public static void cleanup ();
115 [CCode (cname = "xmlNanoHTTPClose")]
118 [CCode (cname = "xmlNanoHTTPContentLength")]
119 public int content_length ();
121 [CCode (cname = "xmlNanoHTTPEncoding")]
122 public unowned string http_encoding ();
124 [CCode (cname = "xmlNanoHTTPFetch")]
125 public static int fetch (string url, string filename, out string content_type);
127 [CCode (cname = "xmlNanoHTTPInit")]
128 public static void init ();
130 [CCode (cname = "xmlNanoHTTPMethod")]
131 public static NanoHTTP* method (string url, string method, string input, out string content_type, string headers, int ilen);
133 [CCode (cname = "xmlNanoHTTPMethodRedir")]
134 public static NanoHTTP* method_redir (string url, string method, string input, out string content_type, out string redir, string headers, int ilen);
136 [CCode (cname = "xmlNanoHTTPMimeType")]
137 public string mime_type ();
139 [CCode (cname = "xmlNanoHTTPOpen")]
140 public static NanoHTTP* open (string url, out string content_type);
142 [CCode (cname = "xmlNanoHTTPOpenRedir")]
143 public static NanoHTTP* open_redir (string url, out string content_type, out string redir);
145 [CCode (cname = "xmlNanoHTTPRead")]
146 public int read (void* dest, int len);
148 [CCode (cname = "xmlNanoHTTPRedir")]
149 public unowned string redir ();
151 [CCode (cname = "xmlNanoHTTPReturnCode")]
152 public int return_code ();
154 [CCode (cname = "xmlNanoHTTPSave")]
155 public int save (string filename);
157 [CCode (cname = "xmlNanoHTTPScanProxy")]
158 public static void scan_proxy (string URL);
162 /* parser - the core parser module */
164 [CCode (cheader_filename = "libxml/parser.h")]
166 [CCode (cname = "xmlCleanupParser")]
167 public static void cleanup ();
169 [CCode (cname = "xmlInitParser")]
170 public static void init ();
172 [CCode (cname = "xmlParseDoc")]
173 public static Doc* parse_doc ([CCode (type = "xmlChar*")] string cur);
175 [CCode (cname = "xmlParseFile")]
176 public static Doc* parse_file (string filename);
178 [CCode (cname = "xmlParseMemory")]
179 public static Doc* parse_memory (string buffer, int size);
181 [CCode (cname = "xmlReadDoc")]
182 public static Doc* read_doc ([CCode (type = "xmlChar*")] string cur, string? url = null, string? encoding = null, int options = 0);
184 [CCode (cname = "xmlReadFd")]
185 public static Doc* read_fd (int fd, string? base_url = null, string? encoding = null, int options = 0);
187 [CCode (cname = "xmlReadFile")]
188 public static Doc* read_file (string filename, string? encoding = null, int options = 0);
190 [CCode (cname = "xmlReadMemory")]
191 public static Doc* read_memory (string text, int len, string? url = null, string? encoding = null, int options = 0);
194 [CCode (cname = "xmlParserOption", cprefix = "XML_PARSE_", cheader_filename = "libxml/parser.h", has_type_id = false)]
195 public enum ParserOption {
221 [CCode (cname = "xmlCharEncoding", cprefix = "XML_CHAR_ENCODING_", cheader_filename = "libxml/encoding.h", has_type_id = false)]
222 public enum CharEncoding {
234 [CCode (cname = "XML_CHAR_ENCODING_8859_1")]
236 [CCode (cname = "XML_CHAR_ENCODING_8859_2")]
238 [CCode (cname = "XML_CHAR_ENCODING_8859_3")]
240 [CCode (cname = "XML_CHAR_ENCODING_8859_4")]
242 [CCode (cname = "XML_CHAR_ENCODING_8859_5")]
244 [CCode (cname = "XML_CHAR_ENCODING_8859_6")]
246 [CCode (cname = "XML_CHAR_ENCODING_8859_7")]
248 [CCode (cname = "XML_CHAR_ENCODING_8859_8")]
250 [CCode (cname = "XML_CHAR_ENCODING_8859_9")]
258 /* tree - interfaces for tree manipulation */
260 [CCode (cheader_filename = "libxml/tree.h")]
262 [CCode (cname = "xmlGetCompressMode")]
263 public static int get_compress_mode ();
265 [CCode (cname = "xmlIsXHTML")]
266 public static int is_xhtml ([CCode (type = "xmlChar*")] string system_id, [CCode (type = "xmlChar*")] string public_id);
268 [CCode (cname = "xmlSetCompressMode")]
269 public static void set_compress_mode (int mode);
271 [CCode (cname = "xmlValidateName")]
272 public static int validate_name ([CCode (type = "const xmlChar*")] string name, bool trim_spaces = false);
274 [CCode (cname = "xmlValidateQName")]
275 public static int validate_q_name ([CCode (type = "const xmlChar*")] string value, bool trim_spaces = false);
277 [CCode (cname = "xmlValidateNCName")]
278 public static int validate_nc_name ([CCode (type = "const xmlChar*")] string value, bool trim_spaces = false);
280 [CCode (cname = "xmlValidateNamesValue")]
281 public static int validate_names_value ([CCode (type = "const xmlChar*")] string value);
283 [CCode (cname = "xmlValidateNameValue")]
284 public static int validate_name_value ([CCode (type = "const xmlChar*")] string value);
286 [CCode (cname = "xmlValidateAttributeValue")]
287 public static int validate_attribute_value (AttributeType type, [CCode (type = "const xmlChar*")] string value);
289 [CCode (cname = "xmlValidateNMToken")]
290 public static int validate_nm_token ([CCode (type = "const xmlChar*")] string value, bool trim_spaces = false);
292 [CCode (cname = "xmlValidateNmtokensValue")]
293 public static int validate_nm_tokens_value ([CCode (type = "const xmlChar*")] string value);
295 [CCode (cname = "xmlValidateNmtokenValue")]
296 public static int validate_nm_token_value ([CCode (type = "const xmlChar*")] string value);
300 [CCode (cname = "xmlAttr", free_function = "xmlFreeProp", cheader_filename = "libxml/tree.h")]
302 public ElementType type;
303 [CCode (type = "xmlChar*")]
304 public weak string name;
305 public Node* children;
312 public AttributeType atype;
314 [CCode (cname = "xmlRemoveProp")]
319 [CCode (cname = "xmlAttribute", cheader_filename = "libxml/tree.h")]
320 public class Attribute {
321 public ElementType type;
322 [CCode (type = "xmlChar*")]
323 public weak string name;
324 public Node* children;
330 public Attribute* nexth;
331 public AttributeType atype;
332 public AttributeDefault def;
333 [CCode (type = "xmlChar*")]
334 public weak string default_value;
335 [CCode (type = "xmlChar*")]
336 public weak string prefix;
337 [CCode (type = "xmlChar*")]
338 public weak string elem;
341 [CCode (cname = "xmlAttributeDefault", cprefix = "XML_ATTRIBUTE_", cheader_filename = "libxml/tree.h", has_type_id = false)]
342 public enum AttributeDefault {
349 [CCode (cname = "xmlAttributeType", cprefix = "XML_ATTRIBUTE_", cheader_filename = "libxml/tree.h", has_type_id = false)]
350 public enum AttributeType {
364 [CCode (cname = "xmlBuffer", free_function = "xmlBufferFree", cheader_filename = "libxml/tree.h")]
365 public class Buffer {
366 [CCode (cname = "xmlBufferCreate")]
369 [CCode (cname = "xmlBufferContent")]
370 public unowned string content ();
372 [CCode (cname = "xmlNodeDump")]
373 public int node_dump (Xml.Doc *doc, Xml.Node *cur, int level, int format);
377 [CCode (cname = "xmlDoc", free_function = "xmlFreeDoc", cheader_filename = "libxml/tree.h,libxml/parser.h")]
379 public ElementType type;
381 public Node* children;
387 public int compression;
388 public int standalone;
389 [CCode (cname = "intSubset")]
390 public Dtd* int_subset;
391 [CCode (cname = "extSubset")]
392 public Dtd* ext_subset;
393 [CCode (cname = "oldNs")]
395 [CCode (type = "xmlChar*")]
396 public weak string version;
397 [CCode (type = "xmlChar*")]
398 public weak string encoding;
399 [CCode (cname = "URL", type = "xmlChar*")]
400 public weak string url;
403 [CCode (cname = "xmlCopyDoc")]
404 public Doc* copy (int recursive);
406 [CCode (cname = "xmlCreateIntSubset")]
407 public Dtd* create_int_subset ([CCode (type = "xmlChar*")] string name, [CCode (type = "xmlChar*")] string external_id, [CCode (type = "xmlChar*")] string system_id);
409 [CCode (cname = "xmlDocDump", instance_pos = -1)]
411 public int dump (Posix.FILE f);
413 public int dump (GLib.FileStream f);
416 [CCode (cname = "xmlDocDumpFormatMemory")]
417 public void dump_memory_format ([CCode (type = "xmlChar*")] out string mem, out int len = null, bool format = true);
419 [CCode (cname = "xmlDocDumpFormatMemoryEnc")]
420 public void dump_memory_enc_format ([CCode (type = "xmlChar**")] out string mem, out int len = null, string enc = "UTF-8", bool format = true);
422 [CCode (cname = "xmlDocDumpMemory")]
423 public void dump_memory ([CCode (type = "xmlChar**")] out string mem, out int len = null);
425 [CCode (cname = "xmlDocDumpMemoryEnc")]
426 public void dump_memory_enc ([CCode (type = "xmlChar**")] out string mem, out int len = null, string enc = "UTF-8");
428 [CCode (cname = "xmlDocFormatDump", instance_pos = 1.1)]
430 public int dump_format (Posix.FILE f, bool format = true);
432 public int dump_format (GLib.FileStream f, bool format = true);
435 [CCode (cname = "xmlDocGetRootElement")]
436 public Node* get_root_element();
438 [CCode (cname = "xmlDocSetRootElement")]
439 public Node* set_root_element(Node* root);
441 [CCode (cname = "xmlElemDump", instance_pos = 1.1)]
443 public void elem_dump (Posix.FILE f, Node* cur);
445 public void elem_dump (GLib.FileStream f, Node* cur);
448 [CCode (cname = "xmlGetDocCompressMode")]
449 public int get_compress_mode ();
451 [CCode (cname = "xmlNewCDataBlock")]
452 public Node* new_cdata_block ([CCode (type = "xmlChar*")] string content, int len);
454 [CCode (cname = "xmlNewCharRef")]
455 public Node* new_char_ref ([CCode (type = "xmlChar*")] string name);
457 [CCode (cname = "xmlNewDoc")]
458 public Doc ([CCode (type = "xmlChar*")] string? version = null);
460 [CCode (cname = "xmlNewDocComment")]
461 public Node* new_comment ([CCode (type = "xmlChar*")] string content);
463 [CCode (cname = "xmlNewDocFragment")]
464 public Node* new_fragment ();
466 [CCode (cname = "xmlNewDocNode")]
467 public Node* new_node (Ns* ns, [CCode (type = "xmlChar*")] string name, [CCode (type = "xmlChar*")] string? content = null);
469 [CCode (cname = "xmlNewDocNodeEatName")]
470 public Node* new_node_eat_name (Ns* ns, [CCode (type = "xmlChar*")] owned string name, [CCode (type = "xmlChar*")] string? content = null);
472 [CCode (cname = "xmlNewDocPI")]
473 public Node* new_pi ([CCode (type = "xmlChar*")] string name, [CCode (type = "xmlChar*")] string content);
475 [CCode (cname = "xmlNewDocProp")]
476 public Attr* new_prop ([CCode (type = "xmlChar*")] string name, [CCode (type = "xmlChar*")] string value);
478 [CCode (cname = "xmlNewDocRawNode")]
479 public Node* new_raw_node (Ns* ns, [CCode (type = "xmlChar*")] string name, [CCode (type = "xmlChar*")] string? content = null);
481 [CCode (cname = "xmlNewDocText")]
482 public Node* new_text ([CCode (type = "xmlChar*")] string content);
484 [CCode (cname = "xmlNewDocTextLen")]
485 public Node* new_text_len ([CCode (type = "xmlChar*")] string content, int len);
487 [CCode (cname = "xmlNewReference")]
488 public Node* new_reference ([CCode (type = "xmlChar*")] string name);
490 [CCode (cname = "xmlGetNsList")]
491 public Ns* get_ns_list (Node* node);
493 [CCode (cname = "xmlNodeListGetRawString", type = "xmlChar*")]
494 public string node_list_get_raw_string (Node* list, bool in_line);
496 [CCode (cname = "xmlNodeListGetString", type = "xmlChar*")]
497 public string node_list_get_string (Node* list, bool in_line);
499 [CCode (cname = "xmlSaveFile", instance_pos = -1)]
500 public int save_file (string filename);
502 [CCode (cname = "xmlSaveFileEnc", instance_pos = 1.1)]
503 public void save_file_enc (string filename, string enc = "UTF-8");
505 [CCode (cname = "xmlSaveFormatFile", instance_pos = 1.1)]
506 public int save_format_file (string filename, int format);
508 [CCode (cname = "xmlSaveFormatFileEnc", instance_pos = 1.1)]
509 public void save_format_file_enc (string filename, string enc = "UTf-8", bool format = true);
511 [CCode (cname = "xmlSetDocCompressMode")]
512 public void set_compress_mode (int mode);
514 [CCode (cname = "xmlStringGetNodeList")]
515 public Node* string_get_node_list (string str);
517 [CCode (cname = "xmlStringLenGetNodeList")]
518 public Node* string_len_get_node_list (string str, int len);
520 [CCode (cname = "xmlSearchNs")]
521 public Ns* search_ns(Node* node, string? prefix);
523 [CCode (cname = "xmlSearchNsByHref")]
524 public Ns* search_ns_by_href(Node* node, string? href);
528 [CCode (cname = "xmlDtd", free_function="xmlFreeDtd", cheader_filename = "libxml/tree.h")]
530 public ElementType type;
531 [CCode (type = "xmlChar*")]
533 public Node* children;
539 public Xml.HashTable* entities;
541 [CCode (cname = "ExternalID", type = "xmlChar*")]
542 public weak string external_id;
543 [CCode (cname = "SystemID", type = "xmlChar*")]
544 public weak string system_id;
546 [CCode (cname = "xmlNewDtd")]
547 public Dtd (Doc* doc, [CCode (type = "xmlChar*")] string name, [CCode (type = "xmlChar*")] string external_id, [CCode (type = "xmlChar*")] string system_id);
549 [CCode (cname = "xmlCopyDtd")]
554 [CCode (cname = "xmlElement", cheader_filename = "libxml/tree.h")]
555 public class Element {
556 public ElementType type;
557 [CCode (type = "xmlChar*")]
558 public weak string name;
559 public Node* children;
565 public Attribute* attributes;
566 [CCode (type = "xmlChar*")]
567 public weak string prefix;
570 [CCode (cname = "xmlElementType", cprefix = "XML_", cheader_filename = "libxml/tree.h", has_type_id = false)]
571 public enum ElementType {
596 [CCode (cname = "xmlElementContent", free_function = "xmlFreeElementContent", cheader_filename = "libxml/tree.h")]
597 public class ElementContent {
598 [CCode (cname = "xmlNewElementContent")]
599 ElementContent ([CCode (type = "xmlChar*")] string name, ElementContentType type);
601 public ElementContentType type;
602 public ElementContentOccur ocur;
603 [CCode (type = "xmlChar*")]
604 public const string name;
605 public ElementContent c1;
606 public ElementContent c2;
607 public ElementContent parent;
608 [CCode (type = "xmlChar*")]
609 public const string prefix;
612 [CCode (cname = "xmlElementContentType", cprefix = "XML_ELEMENT_CONTENT_", cheader_filename = "libxml/tree.h", has_type_id = false)]
613 public enum ElementContentType {
620 [CCode (cname = "xmlElementContentOccur", cprefix = "XML_ELEMENT_CONTENT_", cheader_filename = "libxml/tree.h", has_type_id = false)]
621 public enum ElementContentOccur {
629 [CCode (cname = "xmlEntity", cheader_filename = "libxml/tree.h")]
630 public struct Entity {
631 public void* private;
632 public ElementType type;
633 [CCode (type = "xmlChar*")]
634 public const string name;
635 public Node* children;
641 [CCode (type = "xmlChar*")]
643 [CCode (type = "xmlChar*")]
644 public string content;
646 public EntityType etype;
647 [CCode (cname = "ExternalID", type = "xmlChar*")]
648 public const string external_id;
649 [CCode (cname = "SystemID", type = "xmlChar*")]
650 public const string system_id;
651 public Entity* nexte;
652 [CCode (cname = "URI", type = "xmlChar*")]
653 public const string uri;
658 [CCode (cname = "xmlEntityType", cprefix = "XML_", cheader_filename = "libxml/tree.h", has_type_id = false)]
659 public enum EntityType {
660 INTERNAL_GENERAL_ENTITY,
661 EXTERNAL_GENERAL_PARSED_ENTITY,
662 EXTERNAL_GENERAL_UNPARSED_ENTITY,
663 INTERNAL_PARAMETER_ENTITY,
664 EXTERNAL_PARAMETER_ENTITY,
665 INTERNAL_PREDEFINED_ENTITY
669 [CCode (cname = "xmlEnumeration", cheader_filename = "libxml/tree.h")]
670 public struct Enumeration {
671 public Enumeration* next;
672 [CCode (type = "xmlChar*")]
673 public const string name;
676 [CCode (has_target = false, cname = "xmlHashScannerFull", cheader_filename = "libxml/hash.h")]
677 public delegate void HashScannerFull (void *payload, void *user_data, string name, string name2, string name3);
679 [CCode (has_target = false, cname = "xmlHashDeallocator", cheader_filename = "libxml/hash.h")]
680 public delegate void HashDeallocator (void *payload, string name);
683 [CCode (cname = "xmlHashTable", cheader_filename="libxml/hash.h")]
684 public class HashTable {
685 [CCode (cname = "xmlHashCreate")]
686 public HashTable (int size);
688 [CCode (cname = "xmlHashAddEntry")]
689 public int add_entry (string name, void *user_data);
691 [CCode (cname = "xmlHashFree")]
692 public void free (HashDeallocator? f);
694 [CCode (cname = "xmlHashLookup")]
695 public void *lookup (string name);
697 [CCode (cname = "xmlHashRemoveEntry")]
698 public int remove_entry (string name, HashDeallocator? f);
700 [CCode (cname = "xmlHashScanFull")]
701 public void scan_full (HashScannerFull f, void *user_data);
703 [CCode (cname = "xmlHashSize")]
708 [CCode (cname = "xmlNode", free_function = "xmlFreeNode", cheader_filename = "libxml/tree.h")]
710 public ElementType type;
711 [CCode (type = "xmlChar*")]
712 public weak string name;
713 public Node* children;
720 [CCode (type = "xmlChar*")]
721 public string content;
722 public Attr* properties;
723 [CCode (cname = "nsDef")]
728 [CCode (cname = "xmlAddChild")]
729 public Node* add_child (Node* cur);
731 [CCode (cname = "xmlAddChildList")]
732 public Node* add_child_list (Node* cur);
734 [CCode (cname = "xmlAddNextSibling")]
735 public Node* add_next_sibling (Node* elem);
737 [CCode (cname = "xmlAddPrevSibling")]
738 public Node* add_prev_sibling (Node* elem);
740 [CCode (cname = "xmlAddSibling")]
741 public Node* add_sibling (Node* elem);
743 [CCode (cname = "xmlCopyNode")]
744 public Node* copy (int extended);
746 [CCode (cname = "xmlCopyNodeList")]
747 public Node copy_list ();
749 [CCode (cname = "xmlCopyProp")]
750 public Attr* copy_prop (Attr* prop);
752 [CCode (cname = "xmlCopyPropList")]
753 public Attr* copy_prop_list (Attr* props);
755 [CCode (cname = "xmlDocCopyNode")]
756 public Node* doc_copy (Doc* doc, int extended);
758 [CCode (cname = "xmlDocCopyNodeList")]
759 public Node* doc_copy_list (Doc* doc);
761 [CCode (cname = "xmlFreeNodeList")]
762 public void free_list ();
764 [CCode (cname = "xmlGetLastChild")]
765 public Node* get_last_child ();
767 [CCode (cname = "xmlGetLineNo")]
768 public long get_line_no ();
770 [CCode (cname = "xmlGetNoNsProp", type = "xmlChar*")]
771 public string? get_no_ns_prop ([CCode (type = "xmlChar*")] string name);
773 [CCode (cname = "xmlGetNodePath", type = "xmlChar*")]
774 public string get_path ();
776 [CCode (cname = "xmlGetNsProp", type = "xmlChar*")]
777 public string? get_ns_prop ([CCode (type = "xmlChar*")] string name, [CCode (type = "xmlChar*")] string ns);
779 [CCode (cname = "xmlGetProp", type = "xmlChar*")]
780 public string? get_prop ([CCode (type = "xmlChar*")] string name);
782 [CCode (cname = "xmlHasNsProp")]
783 public Attr* has_ns_prop ([CCode (type = "xmlChar*")] string name, [CCode (type = "xmlChar*")] string? name_space);
785 [CCode (cname = "xmlHasProp")]
786 public Attr* has_prop ([CCode (type = "xmlChar*")] string name);
788 [CCode (cname = "xmlIsBlankNode")]
789 public int is_blank ();
791 [CCode (cname = "xmlNewChild")]
792 public Node* new_child (Ns* ns, [CCode (type = "xmlChar*")] string name, [CCode (type = "xmlChar*")] string? content = null);
794 [CCode (cname = "xmlNewNs")]
795 public Ns* new_ns ([CCode (type = "xmlChar*")] string href, [CCode (type = "xmlChar*")] string prefix);
797 [CCode (cname = "xmlNewNsProp")]
798 public Attr* new_ns_prop (Ns* ns, [CCode (type = "xmlChar*")] string name, [CCode (type = "xmlChar*")] string value);
800 [CCode (cname = "xmlNewProp")]
801 public Attr* new_prop ([CCode (type = "xmlChar*")] string name, [CCode (type = "xmlChar*")] string value);
803 [CCode (cname = "xmlNewTextChild")]
804 public Node* new_text_child (Ns* ns, [CCode (type = "xmlChar*")] string name, [CCode (type = "xmlChar*")] string content);
806 [CCode (cname = "xmlNodeAddContent")]
807 public void add_content ([CCode (type = "xmlChar*")] string content);
809 [CCode (cname = "xmlNodeAddContentLen")]
810 public void add_content_len ([CCode (type = "xmlChar*")] string content, int len);
812 [CCode (cname = "xmlNodeGetContent", type = "xmlChar*")]
813 public string get_content();
815 [CCode (cname = "xmlNodeGetLang", type = "xmlChar*")]
816 public string get_lang();
818 [CCode (cname = "xmlNodeGetSpacePreserve")]
819 public int get_space_preserve();
821 [CCode (cname = "xmlNodeIsText")]
822 public int is_text();
824 [CCode (cname = "xmlNodeSetContent")]
825 public void set_content ([CCode (type = "xmlChar*")] string content);
827 [CCode (cname = "xmlNodeSetContentLen")]
828 public void set_content_len ([CCode (type = "xmlChar*")] string content, int len);
830 [CCode (cname = "xmlNodeSetLang")]
831 public void set_lang ([CCode (type = "xmlChar*")] string val);
833 [CCode (cname = "xmlNodeSetName")]
834 public void set_name ([CCode (type = "xmlChar*")] string name);
836 [CCode (cname = "xmlNodeSetSpacePreserve")]
837 public void set_space_preserve (int val);
839 [CCode (cname = "xmlReplaceNode")]
840 public Node* replace (Node* cur);
842 [CCode (cname = "xmlNewComment")]
843 public Node.comment ([CCode (type = "xmlChar*")] string content);
845 [CCode (cname = "xmlNewNode")]
846 public Node (Ns* ns, [CCode (type = "xmlChar*")] string name);
848 [CCode (cname = "xmlNewNodeEatName")]
849 public Node.eat_name (Ns* ns, [CCode (type = "xmlChar*")] owned string name);
851 [CCode (cname = "xmlNewText")]
852 public Node.text ([CCode (type = "xmlChar*")] string content);
854 [CCode (cname = "xmlNewTextLen")]
855 public Node.text_len ([CCode (type = "xmlChar*")] string content, int len);
857 [CCode (cname = "xmlNewPI")]
858 public Node.pi ([CCode (type = "xmlChar*")] string name, [CCode (type = "xmlChar*")] string content);
860 [CCode (cname = "xmlSetListDoc")]
861 public void set_list_doc (Doc* doc);
863 [CCode (cname = "xmlSetNs")]
864 public void set_ns (Ns* ns);
866 [CCode (cname = "xmlSetNsProp")]
867 public Attr* set_ns_prop (Ns* ns, [CCode (type = "xmlChar*")] string name, [CCode (type = "xmlChar*")] string? value);
869 [CCode (cname = "xmlSetProp")]
870 public Attr* set_prop ([CCode (type = "xmlChar*")] string name, [CCode (type = "xmlChar*")] string? value);
872 [CCode (cname = "xmlSetTreeDoc")]
873 public void set_tree_doc (Doc* doc);
875 [CCode (cname = "xmlTextConcat")]
876 public int text_concat ([CCode (type = "xmlChar*")] string content, int len);
878 [CCode (cname = "xmlTextMerge")]
879 public Node* text_merge (Node* second);
881 [CCode (cname = "xmlUnlinkNode")]
882 public void unlink ();
884 [CCode (cname = "xmlUnsetNsProp")]
885 public int unset_ns_prop (Ns* ns, [CCode (type = "xmlChar*")] string name);
887 [CCode (cname = "xmlUnsetProp")]
888 public int unset_prop ([CCode (type = "xmlChar*")] string name);
890 [CCode (cname = "xmlNextElementSibling")]
891 public Node* next_element_sibling ();
893 [CCode (cname = "xmlPreviousElementSibling")]
894 public Node* previous_element_sibling ();
896 [CCode (cname = "xmlFirstElementChild")]
897 public Node* first_element_child ();
899 [CCode (cname = "xmlLastElementChild")]
900 public Node* last_element_child ();
902 [CCode (cname = "xmlChildElementCount")]
903 public ulong child_element_count ();
907 [CCode (cname = "xmlNs", free_function= "xmlFreeNs", cheader_filename = "libxml/tree.h")]
909 [CCode (cname = "xmlNewNs")]
910 public Ns (Xml.Node* node, [CCode (type = "xmlChar*")] string href, [CCode (type = "xmlChar*")] string prefix);
912 public ElementType type;
913 [CCode (type = "xmlChar*")]
915 [CCode (type = "xmlChar*")]
916 public string prefix;
921 [CCode (cname = "xmlParserCtxt", free_function = "xmlFreeParserCtxt", cheader_filename = "libxml/parser.h")]
922 public class ParserCtxt {
923 public SAXHandler* sax;
924 [CCode (cname = "userData")]
925 public void* user_data;
927 [CCode (cname = "xmlNewParserCtxt")]
928 public ParserCtxt ();
930 [CCode (cname = "xmlCreatePushParserCtxt")]
931 public ParserCtxt.create_push (Xml.SAXHandler* sax, void* user_data, [CCode (array_length = false)] char[] data, int len, string? filename = null);
933 [CCode (cname = "xmlCreateIOParserCtxt")]
934 public ParserCtxt.create_io (Xml.SAXHandler* sax, void* user_data, Xml.InputReadCallback ioread, Xml.InputCloseCallback ioclose, void* ioctx, string? encoding = null);
936 [CCode (cname = "xmlCreateDocParserCtxt")]
937 public ParserCtxt.create_doc ([CCode (type = "xmlChar*")] string cur);
939 [CCode (cname = "xmlParseChunk")]
940 public int parse_chunk ([CCode (array_length = false)] char[] data, int size, bool terminate);
942 [CCode (cname = "xmlParseDocument")]
943 public int parse_document ();
945 [CCode (cname = "xmlCtxtResetPush")]
946 public void reset_push ([CCode (array_length = false)] char[] data, int len, string? filename = null, string? encoding = null);
948 [CCode (cname = "xmlCtxtReset")]
949 public void reset ();
951 [CCode (cname = "xmlCtxtInit")]
954 [CCode (cname = "xmlCtxtClear")]
955 public void clear ();
957 [CCode (cname = "xmlCtxtUseOptions")]
958 public int use_options (int options);
960 [CCode (cname = "xmlCtxtReadDoc")]
961 public Doc* read_doc ([CCode (type = "xmlChar*")] string cur, string url, string? encoding = null, int options = 0);
963 [CCode (cname = "xmlCtxtReadFile")]
964 public Doc* read_file (string filename, string? encoding = null, int options = 0);
966 [CCode (cname = "xmlCtxtReadMemory")]
967 public Doc* read_memory ([CCode (array_length = false)] char[] buffer, int size, string url, string? encoding = null, int options = 0);
969 [CCode (cname = "xmlCtxtReadFd")]
970 public Doc* read_fd (int fd, string url, string? encoding = null, int options = 0);
972 [CCode (cname = "xmlCtxtReadIO")]
973 public Doc* read_io (Xml.InputReadCallback ioread, Xml.InputCloseCallback ioclose, void* ioctx, string url, string? encoding = null, int options = 0);
975 [CCode (cname = "xmlCtxtGetLastError")]
976 public Error* get_last_error ();
978 [CCode (cname = "xmlCtxtResetLastError")]
979 public Error* reset_last_error ();
983 /* uri - library of generic URI related routines */
986 [CCode (cname = "xmlURI", free_function = "xmlFreeURI", cheader_filename = "libxml/uri.h")]
988 [CCode (cname = "xmlBuildRelativeURI", type = "xmlChar*")]
989 public static string build_relative ([CCode (type = "xmlChar*")] string uri, [CCode (type = "xmlChar*")] string @base);
991 [CCode (cname = "xmlBuildURI", type = "xmlChar*")]
992 public static string build ([CCode (type = "xmlChar*")] string URI, [CCode (type = "xmlChar*")] string @base);
994 [CCode (cname = "xmlCanonicPath", type = "xmlChar*")]
995 public static string canonic_path ([CCode (type = "xmlChar*")] string path);
997 [CCode (cname = "xmlCreateURI")]
1000 [CCode (cname = "xmlNormalizeURIPath")]
1001 public static int normalize_uri_path (string path);
1003 [CCode (cname = "xmlParseURI")]
1004 public static URI? parse (string str);
1006 [CCode (cname = "xmlParseURIRaw")]
1007 public static URI? parse_raw (string str, bool raw);
1009 [CCode (cname = "xmlParseURIReference")]
1010 public int parse_reference (string str);
1012 [CCode (cname = "xmlPathToURI", type = "xmlChar*")]
1013 public static string path_to_uri ([CCode (type = "xmlChar*")] string path);
1015 [CCode (cname = "xmlPrintURI", instance_pos = -1)]
1017 public void print (Posix.FILE stream);
1019 public void print (GLib.FileStream stream);
1022 [CCode (cname = "xmlSaveUri", type = "xmlChar*")]
1023 public string save ();
1025 [CCode (cname = "xmlURIEscape", type = "xmlChar*")]
1026 public static string escape ([CCode (type = "xmlChar*")] string str);
1028 [CCode (cname = "xmlURIEscapeStr", type = "xmlChar*")]
1029 public static string escape_str ([CCode (type = "xmlChar*")] string str, [CCode (type = "xmlChar*")] string list);
1031 [CCode (cname = "xmlURIUnescapeString")]
1032 public static string unescape_string (string str, int len, string? target);
1034 public string scheme;
1035 public string opaque;
1036 public string authority;
1037 public string server;
1041 public string query;
1042 public string fragment;
1044 public string query_raw;
1048 /* xmlIO - interface for the I/O interfaces used by the parser */
1050 [CCode (has_target = false, cname = "xmlInputCloseCallback", cheader_filename = "libxml/xmlIO.h")]
1051 public delegate int InputCloseCallback (void* context);
1053 [CCode (has_target = false, cname = "xmlInputReadCallback", cheader_filename = "libxml/xmlIO.h")]
1054 public delegate int InputReadCallback (void* context, [CCode (array_length = false)] char[] buffer, int len);
1056 [CCode (has_target = false, cname = "xmlInputMatchCallback", cheader_filename = "libxml/xmlIO.h")]
1057 public delegate int InputMatchCallback (string filename);
1059 [CCode (has_target = false, cname = "xmlInputOpenCallback", cheader_filename = "libxml/xmlIO.h")]
1060 public delegate void* InputOpenCallback (string filename);
1062 [CCode (has_target = false, cname = "xmlOutputMatchCallback", cheader_filename = "libxml/xmlIO.h")]
1063 public delegate int OutputMatchCallback (string filename);
1065 [CCode (has_target = false, cname = "xmlOutputOpenCallback", cheader_filename = "libxml/xmlIO.h")]
1066 public delegate void* OutputOpenCallback (string filename);
1068 [CCode (has_target = false, cname = "xmlOutputWriteCallback", cheader_filename = "libxml/xmlIO.h")]
1069 public delegate int OutputWriteCallback ([CCode (array_length = false)] char[] buffer, int len);
1071 [CCode (has_target = false, cname = "xmlOutputCloseCallback", cheader_filename = "libxml/xmlIO.h")]
1072 public delegate int OutputCloseCallback (void * context);
1074 [CCode (cname = "xmlRegisterInputCallbacks", cheader_filename = "libxml/xmlIO.h")]
1075 public int registerInputCallbacks (InputMatchCallback matchFunc, InputOpenCallback openFunc, InputReadCallback readFunc, InputCloseCallback closeFunc);
1077 [CCode (cname = "xmlRegisterOutputCallbacks", cheader_filename = "libxml/xmlIO.h")]
1078 public int registerOutputCallbacks(OutputMatchCallback matchFunc, OutputOpenCallback openFunc, OutputWriteCallback writeFunc, OutputCloseCallback closeFunc);
1080 /* xmlschemas - incomplete XML Schemas structure implementation */
1083 [CCode (cname = "xmlSchema", free_function = "xmlSchemaFree", cheader_filename = "libxml/xmlschemas.h")]
1084 public class Schema {
1085 [CCode (cname = "xmlSchemaDump", instance_pos = -1)]
1086 public void dump (GLib.FileStream output);
1090 [CCode (cname = "xmlSchemaParserCtxt", free_function = "xmlSchemaFreeParserCtxt", cheader_filename = "libxml/xmlschemas.h")]
1091 public class SchemaParserCtxt {
1092 [CCode (cname = "xmlSchemaNewParserCtxt")]
1093 public SchemaParserCtxt (string URL);
1094 [CCode (cname = "xmlSchemaNewDocParserCtxt")]
1095 public SchemaParserCtxt.from_doc (Xml.Doc doc);
1096 [CCode (cname = "xmlSchemaNewMemParserCtxt")]
1097 public SchemaParserCtxt.from_buffer (uint8[] buffer);
1098 [CCode (cname = "xmlSchemaParse")]
1099 public Xml.Schema parse ();
1103 [CCode (cname = "xmlSchemaValidCtxt", free_function = "xmlSchemaFreeValidCtxt", cheader_filename = "libxml/xmlschemas.h")]
1104 public class SchemaValidCtxt {
1105 [CCode (cname = "xmlSchemaNewValidCtxt")]
1106 public SchemaValidCtxt (Xml.Schema schema);
1107 [CCode (cname = "xmlSchemaValidateDoc")]
1108 public int validate_doc (Xml.Doc doc);
1114 [CCode (cname = "xmlSaveCtxt", free_function = "xmlSaveClose", cheader_filename = "libxml/xmlsave.h")]
1115 public class SaveCtxt {
1116 [CCode (cname = "xmlSaveToIO")]
1117 public SaveCtxt.to_io (OutputWriteCallback iowrite, OutputCloseCallback ioclose, void * ioctx = null, string? encoding = null, int options = 0);
1119 [CCode (cname = "xmlSaveClose")]
1120 public int close ();
1121 [CCode (cname = "xmlSaveFlush")]
1122 public int flush ();
1123 [CCode (cname = "xmlSaveDoc")]
1124 public int save_doc (Xml.Doc *doc);
1125 [CCode (cname = "xmlSaveTree")]
1126 public int save_tree (Xml.Node *node);
1129 /* xmlwriter - the XMLWriter implementation */
1132 [CCode (cname = "xmlTextWriter", free_function = "xmlFreeTextWriter", cheader_filename = "libxml/xmlwriter.h")]
1133 public class TextWriter {
1134 [CCode (cname = "xmlNewTextWriterFilename")]
1135 public TextWriter.filename (string uri, bool compression = false);
1137 [CCode (cname = "xmlNewTextWriterDoc")]
1138 public TextWriter.doc (out Doc doc, bool compression = false);
1140 [CCode (cname = "xmlNewTextWriterMemory")]
1141 public TextWriter.memory (Buffer buffer, bool compression = false);
1143 [CCode (cname = "xmlNewTextWriterPushParser")]
1144 public TextWriter.parser (ParserCtxt ctxt, bool compression = false);
1146 [CCode (cname = "xmlNewTextWriterTree")]
1147 public TextWriter.tree (Doc doc, Node node, bool compression = false);
1149 [CCode (cname = "xmlTextWriterFlush")]
1150 public int flush ();
1152 [CCode (cname = "xmlTextWriterSetIndent")]
1153 public int set_indent (bool indent);
1155 [CCode (cname = "xmlTextWriterSetIndentString")]
1156 public int set_indent_string ([CCode (type = "xmlChar*")] string str);
1159 [CCode (cname = "xmlTextWriterEndCDATA")]
1160 public int end_cdata ();
1162 [CCode (cname = "xmlTextWriterEndComment")]
1163 public int end_comment ();
1165 [CCode (cname = "xmlTextWriterEndDocument")]
1166 public int end_document ();
1168 [CCode (cname = "xmlTextWriterEndElement")]
1169 public int end_element ();
1171 [CCode (cname = "xmlTextWriterEndAttribute")]
1172 public int end_attribute ();
1174 [CCode (cname = "xmlTextWriterEndDTD")]
1175 public int end_dtd ();
1177 [CCode (cname = "xmlTextWriterEndDTDAttlist")]
1178 public int end_dtd_attlist ();
1180 [CCode (cname = "xmlTextWriterEndDTDElement")]
1181 public int end_dtd_element ();
1183 [CCode (cname = "xmlTextWriterEndDTDEntity")]
1184 public int end_dtd_entity ();
1188 [CCode (cname = "xmlTextWriterStartCDATA")]
1189 public int start_cdata ();
1191 [CCode (cname = "xmlTextWriterStartComment")]
1192 public int start_comment ();
1194 [CCode (cname = "xmlTextWriterStartDocument")]
1195 public int start_document (string? version = null, string? encoding = null, string? standalone = null);
1197 [CCode (cname = "xmlTextWriterStartElement")]
1198 public int start_element ([CCode (type = "xmlChar*")] string name);
1200 [CCode (cname = "xmlTextWriterStartElementNS")]
1201 public int start_element_ns ([CCode (type = "xmlChar*")] string prefix, [CCode (type = "xmlChar*")] string name, [CCode (type = "xmlChar*")] string? namespaceURI);
1203 [CCode (cname = "xmlTextWriterStartAttribute")]
1204 public int start_attribute ([CCode (type = "xmlChar*")] string name);
1206 [CCode (cname = "xmlTextWriterStartAttributeNS")]
1207 public int start_attribute_ns ([CCode (type = "xmlChar*")] string? prefix, [CCode (type = "xmlChar*")] string name, [CCode (type = "xmlChar*")] string? namespaceURI);
1209 [CCode (cname = "xmlTextWriterStartDTD")]
1210 public int start_dtd ([CCode (type = "xmlChar*")] string name, [CCode (type = "xmlChar*")] string? pubid, [CCode (type = "xmlChar*")] string? sysid);
1212 [CCode (cname = "xmlTextWriterStartDTDAttlist")]
1213 public int start_dtd_attlist ([CCode (type = "xmlChar*")] string name);
1215 [CCode (cname = "xmlTextWriterStartDTDElement")]
1216 public int start_dtd_element ([CCode (type = "xmlChar*")] string name);
1218 [CCode (cname = "xmlTextWriterStartDTDEntity")]
1219 public int start_dtd_entity (bool pe, [CCode (type = "xmlChar*")] string name);
1223 [CCode (cname = "xmlTextWriterWriteAttribute")]
1224 public int write_attribute ([CCode (type = "xmlChar*")] string name, [CCode (type = "xmlChar*")] string content);
1226 [CCode (cname = "xmlTextWriterWriteAttributeNS")]
1227 public int write_attribute_ns ([CCode (type = "xmlChar*")] string? prefix, [CCode (type = "xmlChar*")] string name, [CCode (type = "xmlChar*")] string? namespaceURI, [CCode (type = "xmlChar*")] string content);
1229 [CCode (cname = "xmlTextWriterWriteElement")]
1230 public int write_element ([CCode (type = "xmlChar*")] string name, [CCode (type = "xmlChar*")] string content);
1232 [CCode (cname = "xmlTextWriterWriteElementNS")]
1233 public int write_element_ns ([CCode (type = "xmlChar*")] string prefix, [CCode (type = "xmlChar*")] string name, [CCode (type = "xmlChar*")] string namespaceURI, [CCode (type = "xmlChar*")] string content);
1235 [CCode (cname = "xmlTextWriterWriteBase64")]
1236 public int write_base64 (void* data, int start, int length);
1238 [CCode (cname = "xmlTextWriterWriteComment")]
1239 public int write_comment ([CCode (type = "xmlChar*")] string content);
1241 [CCode (cname = "xmlTextWriterWriteCDATA")]
1242 public int write_cdata ([CCode (type = "xmlChar*")] string content);
1244 [CCode (cname = "xmlTextWriterWritePI")]
1245 public int write_pi ([CCode (type = "xmlChar*")] string target, [CCode (type = "xmlChar*")] string content);
1247 [CCode (cname = "xmlTextWriterWriteString")]
1248 public int write_string ([CCode (type = "xmlChar*")] string content);
1250 [CCode (cname = "xmlTextWriterWriteDocType")]
1251 public int write_document_type ([CCode (type = "xmlChar*")] string name, [CCode (type = "xmlChar*")] string? pubid, [CCode (type = "xmlChar*")] string? sysid, [CCode (type = "xmlChar*")] string? subset);
1253 [CCode (cname = "xmlTextWriterWriteDTD")]
1254 public int write_dtd ([CCode (type = "xmlChar*")] string name, [CCode (type = "xmlChar*")] string? pubid, [CCode (type = "xmlChar*")] string? sysid, [CCode (type = "xmlChar*")] string? subset);
1256 [CCode (cname = "xmlTextWriterWriteDTDAttlist")]
1257 public int write_dtd_attlist ([CCode (type = "xmlChar*")] string name, [CCode (type = "xmlChar*")] string content);
1259 [CCode (cname = "xmlTextWriterWriteDTDElement")]
1260 public int write_dtd_element ([CCode (type = "xmlChar*")] string name, [CCode (type = "xmlChar*")] string content);
1262 [CCode (cname = "xmlTextWriterWriteDTDEntity")]
1263 public int write_dtd_entity ([CCode (type = "xmlChar*")] string name, [CCode (type = "xmlChar*")] string? pubid, [CCode (type = "xmlChar*")] string? sysid, [CCode (type = "xmlChar*")] string ndataid, [CCode (type = "xmlChar*")] string content);
1265 [CCode (cname = "xmlTextWriterWriteDTDExternalEntity")]
1266 public int write_dtd_external_entity (bool pe, [CCode (type = "xmlChar*")] string name, [CCode (type = "xmlChar*")] string? pubid, [CCode (type = "xmlChar*")] string? sysid, [CCode (type = "xmlChar*")] string ndataid);
1268 [CCode (cname = "xmlTextWriterWriteDTDExternalEntityContents")]
1269 public int write_dtd_external_entity_contents ([CCode (type = "xmlChar*")] string? pubid, [CCode (type = "xmlChar*")] string? sysid, [CCode (type = "xmlChar*")] string ndataid);
1271 [CCode (cname = "xmlTextWriterWriteDTDInternalEntity")]
1272 public int write_dtd_internal_entity (bool pe, [CCode (type = "xmlChar*")] string name, [CCode (type = "xmlChar*")] string content);
1274 [CCode (cname = "xmlTextWriterWriteDTDNotation")]
1275 public int write_dtd_notation ([CCode (type = "xmlChar*")] string name, [CCode (type = "xmlChar*")] string? pubid, [CCode (type = "xmlChar*")] string? sysid);
1279 [CCode (cname = "xmlTextWriterWriteFormatAttribute")]
1280 public int format_attribute ([CCode (type = "xmlChar*")] string name, string format, ...);
1282 [CCode (cname = "xmlTextWriterWriteFormatAttributeNS")]
1283 public int format_attribute_ns ([CCode (type = "xmlChar*")] string prefix, [CCode (type = "xmlChar*")] string name, [CCode (type = "xmlChar*")] string namespaceURI, string format, ...);
1285 [CCode (cname = "xmlTextWriterWriteFormatCDATA")]
1286 public int format_cdata (string format, ...);
1288 [CCode (cname = "xmlTextWriterWriteFormatComment")]
1289 public int format_comment (string format, ...);
1291 [CCode (cname = "xmlTextWriterWriteFormatElement")]
1292 public int format_element ([CCode (type = "xmlChar*")] string name, string format, ...);
1294 [CCode (cname = "xmlTextWriterWriteFormatElementNS")]
1295 public int format_element_ns ([CCode (type = "xmlChar*")] string prefix, [CCode (type = "xmlChar*")] string name, [CCode (type = "xmlChar*")] string namespaceURI, string format, ...);
1297 [CCode (cname = "xmlTextWriterWriteFormatString")]
1298 public int format_string (string format, ...);
1301 /* xmlreader - the XMLReader implementation */
1303 [CCode (cname = "xmlParserProperties", cprefix = "XML_PARSER_", cheader_filename = "libxml/xmlreader.h", has_type_id = false)]
1304 public enum ParserProperties {
1311 [CCode (cname = "xmlParserSeverities", cprefix = "XML_PARSER_SEVERITY_", cheader_filename = "libxml/xmlreader.h", has_type_id = false)]
1312 public enum ParserSeverities {
1319 [CCode (cname = "xmlReaderTypes", cheader_filename = "libxml/xmlreader.h", has_type_id = false)]
1320 public enum ReaderType {
1328 PROCESSING_INSTRUCTION,
1335 SIGNIFICANT_WHITESPACE,
1342 [CCode (cname = "xmlTextReader", free_function = "xmlFreeTextReader", cheader_filename = "libxml/xmlreader.h")]
1343 public class TextReader {
1344 [CCode (cname = "xmlNewTextReaderFilename")]
1345 public TextReader.filename (string uri);
1347 [CCode (cname = "xmlReaderForDoc")]
1348 public TextReader.for_doc ([CCode (type = "xmlChar*")] string cur, string url, string? encoding = null, int options = 0);
1350 [CCode (cname = "xmlReaderForFd")]
1351 public TextReader.for_fd (int fd, string url, string? encoding = null, int options = 0);
1353 [CCode (cname = "xmlReaderForFile")]
1354 public TextReader.for_file (string filename, string? encoding = null, int options = 0);
1356 [CCode (cname = "xmlReaderForIO")]
1357 public TextReader.for_io (InputReadCallback ioread, InputCloseCallback ioclose, void* ioctx, string url, string? encoding = null, int options = 0);
1359 [CCode (cname = "xmlReaderForMemory")]
1360 public TextReader.for_memory ([CCode (array_length = false)] char[] buffer, int size, string url, string? encoding = null, int options = 0);
1362 [CCode (cname = "xmlReaderNewDoc")]
1363 public int new_doc ([CCode (type = "xmlChar*")] string cur, string url, string? encoding = null, int options = 0);
1365 [CCode (cname = "xmlReaderNewFd")]
1366 public int new_fd (int fd, string url, string? encoding = null, int options = 0);
1368 [CCode (cname = "xmlReaderNewFile")]
1369 public int new_file (string filename, string? encoding = null, int options = 0);
1371 [CCode (cname = "xmlReaderNewIO")]
1372 public int new_io (InputReadCallback ioread, InputCloseCallback ioclose, void* ioctx, string url, string? encoding = null, int options = 0);
1374 [CCode (cname = "xmlReaderNewMemory")]
1375 public int new_memory ([CCode (array_length = false)] char[] buffer, int size, string url, string? encoding = null, int options = 0);
1377 [CCode (cname = "xmlReaderNewWalker")]
1378 public int new_walker (Doc* doc);
1380 [CCode (cname = "xmlReaderWalker")]
1381 public TextReader.walker (Doc* doc);
1383 [CCode (cname = "xmlTextReaderAttributeCount")]
1384 public int attribute_count ();
1386 [CCode (cname = "xmlTextReaderBaseUri", type = "xmlChar*")]
1387 public string base_uri ();
1389 [CCode (cname = "xmlTextReaderByteConsumed")]
1390 public long byte_consumed ();
1392 [CCode (cname = "xmlTextReaderClose")]
1393 public int close ();
1395 [CCode (cname = "xmlTextReaderConstBaseUri", type = "xmlChar*")]
1396 public unowned string const_base_uri ();
1398 [CCode (cname = "xmlTextReaderConstEncoding", type = "xmlChar*")]
1399 public unowned string const_encoding ();
1401 [CCode (cname = "xmlTextReaderConstLocalName", type = "xmlChar*")]
1402 public unowned string const_local_name ();
1404 [CCode (cname = "xmlTextReaderConstName", type = "xmlChar*")]
1405 public unowned string const_name ();
1407 [CCode (cname = "xmlTextReaderConstNamespaceUri", type = "xmlChar*")]
1408 public unowned string const_namespace_uri ();
1410 [CCode (cname = "xmlTextReaderConstPrefix", type = "xmlChar*")]
1411 public unowned string const_prefix ();
1413 [CCode (cname = "xmlTextReaderConstString", type = "xmlChar*")]
1414 public unowned string const_string ([CCode (type = "xmlChar*")] string str);
1416 [CCode (cname = "xmlTextReaderConstValue", type = "xmlChar*")]
1417 public unowned string const_value ();
1419 [CCode (cname = "xmlTextReaderConstXmlLang", type = "xmlChar*")]
1420 public unowned string const_xml_lang ();
1422 [CCode (cname = "xmlTextReaderConstXmlVersion", type = "xmlChar*")]
1423 public unowned string const_xml_version ();
1425 [CCode (cname = "xmlTextReaderCurrentDoc")]
1426 public Doc* current_doc ();
1428 [CCode (cname = "xmlTextReaderCurrentNode")]
1429 public Node* current_node ();
1431 [CCode (cname = "xmlTextReaderDepth")]
1432 public int depth ();
1434 [CCode (cname = "xmlTextReaderExpand")]
1435 public Node* expand ();
1437 [CCode (cname = "xmlTextReaderGetAttribute", type = "xmlChar*")]
1438 public string get_attribute (string name);
1440 [CCode (cname = "xmlTextReaderGetAttributeNo", type = "xmlChar*")]
1441 public string get_attribute_no (int no);
1443 [CCode (cname = "xmlTextReaderGetAttributeNs", type = "xmlChar*")]
1444 public string get_attribute_ns ([CCode (type = "xmlChar*")] string local_name, [CCode (type = "xmlChar*")] string namespace_uri);
1446 [CCode (cname = "xmlTextReaderGetErrorHandler")]
1447 public void get_error_handler (out TextReaderErrorFunc f, void** arg);
1449 [CCode (cname = "xmlTextReaderGetParserColumnNumber")]
1450 public int get_parser_column_number ();
1452 [CCode (cname = "xmlTextReaderGetParserLineNumber")]
1453 public int get_parser_line_number ();
1455 [CCode (cname = "xmlTextReaderGetParserProp")]
1456 public int get_parser_prop (int prop);
1458 [CCode (cname = "xmlTextReaderHasAttributes")]
1459 public int has_attributes ();
1461 [CCode (cname = "xmlTextReaderHasValue")]
1462 public int has_value ();
1464 [CCode (cname = "xmlTextReaderIsDefault")]
1465 public int is_default ();
1467 [CCode (cname = "xmlTextReaderIsEmptyElement")]
1468 public int is_empty_element ();
1470 [CCode (cname = "xmlTextReaderIsNamespaceDecl")]
1471 public int is_namespace_decl ();
1473 [CCode (cname = "xmlTextReaderIsValid")]
1474 public int is_valid ();
1476 [CCode (cname = "xmlTextReaderLocalName", type = "xmlChar*")]
1477 public string local_name ();
1479 [CCode (cname = "xmlTextReaderLookupNamespace", type = "xmlChar*")]
1480 public string lookup_namespace ([CCode (type = "xmlChar*")] string prefix);
1482 [CCode (cname = "xmlTextReaderMoveToAttribute")]
1483 public int move_to_attribute ([CCode (type = "xmlChar*")] string name);
1485 [CCode (cname = "xmlTextReaderMoveToAttributeNo")]
1486 public int move_to_attribute_no (int no);
1488 [CCode (cname = "xmlTextReaderMoveToAttributeNs")]
1489 public int move_to_attribute_ns ([CCode (type = "xmlChar*")] string local_name, [CCode (type = "xmlChar*")] string namespace_uri);
1491 [CCode (cname = "xmlTextReaderMoveToElement")]
1492 public int move_to_element ();
1494 [CCode (cname = "xmlTextReaderMoveToFirstAttribute")]
1495 public int move_to_first_attribute ();
1497 [CCode (cname = "xmlTextReaderMoveToNextAttribute")]
1498 public int move_to_next_attribute ();
1500 [CCode (cname = "xmlTextReaderName", type = "xmlChar*")]
1501 public string name ();
1503 [CCode (cname = "xmlTextReaderNamespaceUri", type = "xmlChar*")]
1504 public string namespace_uri ();
1506 [CCode (cname = "xmlTextReaderNext")]
1509 [CCode (cname = "xmlTextReaderNextSibling")]
1510 public int next_sibling ();
1512 [CCode (cname = "xmlTextReaderNodeType")]
1513 public int node_type ();
1515 [CCode (cname = "xmlTextReaderNormalization")]
1516 public int normalization ();
1518 [CCode (cname = "xmlTextReaderPrefix", type = "xmlChar*")]
1519 public string prefix ();
1521 [CCode (cname = "xmlTextReaderPreserve")]
1522 public Node* preserve ();
1524 [CCode (cname = "xmlTextReaderPreservePattern")]
1525 public int preserve_pattern ([CCode (type = "xmlChar*")] string pattern, [CCode (array_length = false, type = "xmlChar**")] string[] namespaces);
1527 [CCode (cname = "xmlTextReaderQuoteChar")]
1528 public int quote_char ();
1530 [CCode (cname = "xmlTextReaderRead")]
1533 [CCode (cname = "xmlTextReaderReadAttributeValue")]
1534 public int read_attribute_value ();
1536 [CCode (cname = "xmlTextReaderReadInnerXml", type = "xmlChar*")]
1537 public string read_inner_xml ();
1539 [CCode (cname = "xmlTextReaderReadOuterXml", type = "xmlChar*")]
1540 public string read_outer_xml ();
1542 [CCode (cname = "xmlTextReaderReadState")]
1543 public int read_state ();
1545 [CCode (cname = "xmlTextReaderReadString", type = "xmlChar*")]
1546 public string read_string ();
1548 [CCode (cname = "xmlTextReaderSchemaValidate")]
1549 public int schema_validate (string xsd);
1551 [CCode (cname = "xmlTextReaderSchemaValidateCtxt")]
1552 public int schema_validate_ctxt (SchemaValidCtxt* ctxt, int options);
1554 [CCode (cname = "xmlTextReaderSetErrorHandler")]
1555 public void set_error_handler (TextReaderErrorFunc f, void* arg);
1557 [CCode (cname = "xmlTextReaderSetParserProp")]
1558 public int set_parser_prop (SchemaValidCtxt* ctxt, int options);
1560 [CCode (cname = "xmlTextReaderStandalone")]
1561 public int standalone ();
1563 [CCode (cname = "xmlTextReaderValue", type = "xmlChar*")]
1564 public string value ();
1566 [CCode (cname = "xmlTextReaderXmlLang", type = "xmlChar*")]
1567 public string xml_lang ();
1571 [CCode (cname = "void", cheader_filename = "libxml/xmlreader.h")]
1572 public class TextReaderLocator {
1575 [CCode (cname = "xmlTextReaderMode", cprefix = "XML_TEXTREADER_MODE_", cheader_filename = "libxml/xmlreader.h", has_type_id = false)]
1576 public enum TextReaderMode {
1585 [CCode (has_target = false)]
1586 public delegate void TextReaderErrorFunc (void* arg, string msg, ParserSeverities severity, TextReaderLocator* locator);
1589 /* xpath - XML Path Language implementation */
1591 [CCode (cheader_filename = "libxml/xpath.h")]
1593 [CCode (cname = "xmlXPathOrderDocElems")]
1594 public static long order_doc_elements (Doc* doc);
1597 [CCode (cname = "xmlNodeSet", free_function="xmlXPathFreeNodeSet", cheader_filename = "libxml/xpath.h")]
1598 public class NodeSet {
1599 [CCode (cname = "xmlXPathNodeSetGetLength")]
1600 public int length ();
1602 [CCode (cname = "xmlXPathNodeSetIsEmpty")]
1603 public bool is_empty ();
1605 [CCode (cname = "xmlXPathNodeSetItem")]
1606 public Node* item (int index);
1610 [CCode (cname = "xmlXPathContext", free_function = "xmlXPathFreeContext", cheader_filename = "libxml/xpath.h")]
1611 public class Context {
1615 [CCode (cname = "xmlXPathContextSetCache")]
1616 public int set_cache (int active, int value, int options);
1618 [CCode (cname = "xmlXPathEval", instance_pos = -1)]
1619 public Object* eval ([CCode (type = "xmlChar*")] string str);
1621 [CCode (cname = "xmlXPathEvalExpression", instance_pos = -1)]
1622 public Object* eval_expression ([CCode (type = "xmlChar*")] string str);
1624 [CCode (cname = "xmlXPathRegisterNs", cheader_filename = "libxml/xpathInternals.h")]
1625 public int register_ns ([CCode (type = "xmlChar*")] string prefix, [CCode (type = "xmlChar*")] string ns_uri);
1627 [CCode (cname = "xmlXPathNewContext")]
1628 public Context (Doc* doc);
1631 [CCode (cname = "xmlXPathError", cprefix = "XPATH_", cheader_filename = "libxml/xpath.h", has_type_id = false)]
1635 UNFINISHED_LITERAL_ERROR,
1636 START_LITERAL_ERROR,
1638 UNDEF_VARIABLE_ERROR,
1639 INVALID_PREDICATE_ERROR,
1647 INVALID_CTXT_POSITION,
1649 [CCode (cname = "XPTR_SYNTAX_ERROR")]
1651 [CCode (cname = "XPTR_RESOURCE_ERROR")]
1652 XPTR_RESOURCE_ERROR,
1653 [CCode (cname = "XPTR_SUB_RESOURCE_ERROR")]
1654 XPTR_SUB_RESOURCE_ERROR,
1662 [CCode (cname = "xmlXPathObject", free_function="xmlXPathFreeObject", cheader_filename = "libxml/xpath.h")]
1663 public class Object {
1664 public ObjectType type;
1665 public NodeSet* nodesetval;
1667 public double floatval;
1668 [CCode (type = "xmlChar*")]
1669 public string stringval;
1676 [CCode (cname = "xmlXPathObjectType", cprefix = "XPATH_", cheader_filename = "libxml/xpath.h", has_type_id = false)]
1677 public enum ObjectType {
1693 [CCode (cname = "attributeDeclSAXFunc", has_target = false)]
1694 public delegate void attributeDeclSAXFunc (void* ctx, [CCode (type = "xmlChar*")] string elem, [CCode (type = "xmlChar*")] string fullname, int type, int def, [CCode (type = "xmlChar*")] string defaultValue, Enumeration* tree);
1696 [CCode (cname = "attributeSAXFunc", has_target = false)]
1697 public delegate void attributeSAXFunc (void* ctx, [CCode (type = "xmlChar*")] string name, [CCode (type = "xmlChar*")] string value);
1699 [CCode (cname = "cdataBlockSAXFunc", has_target = false)]
1700 public delegate void cdataBlockSAXFunc (void* ctx, [CCode (type = "xmlChar*")] string value, int len);
1702 [CCode (cname = "charactersSAXFunc", has_target = false)]
1703 public delegate void charactersSAXFunc (void* ctx, [CCode (type = "xmlChar*")] string ch, int len);
1705 [CCode (cname = "commentsSAXFunc", has_target = false)]
1706 public delegate void commentSAXFunc (void* ctx, [CCode (type = "xmlChar*")] string value);
1708 [CCode (cname = "elementDeclSAXFunc", has_target = false)]
1709 public delegate void elementDeclSAXFunc (void* ctx, [CCode (type = "xmlChar*")] string name, int type, ElementContent content);
1711 [CCode (cname = "endDocumentSAXFunc", has_target = false)]
1712 public delegate void endDocumentSAXFunc (void* ctx);
1714 [CCode (cname = "endElementNsSAX2Func", has_target = false)]
1715 public delegate void endElementNsSAX2Func (void* ctx, [CCode (type = "xmlChar*")] string localname, [CCode (type = "xmlChar*")] string prefix, [CCode (type = "xmlChar*")] string URI);
1717 [CCode (cname = "endElementSAXFunc", has_target = false)]
1718 public delegate void endElementSAXFunc (void* ctx, [CCode (type = "xmlChar*")] string name);
1720 [CCode (cname = "entityDeclSAXFunc", has_target = false)]
1721 public delegate void entityDeclSAXFunc (void* ctx, [CCode (type = "xmlChar*")] string name, int type, [CCode (type = "xmlChar*")] string publicId, [CCode (type = "xmlChar*")] string systemId, [CCode (type = "xmlChar*")] string content);
1723 [CCode (cname = "errorSAXFunc", has_target = false)]
1724 public delegate void errorSAXFunc (void* ctx, string msg, ...);
1726 [CCode (cname = "externalSubsetSAXFunc", has_target = false)]
1727 public delegate void externalSubsetSAXFunc (void* ctx, [CCode (type = "xmlChar*")] string name, [CCode (type = "xmlChar*")] string ExternalID, [CCode (type = "xmlChar*")] string SystemID);
1729 [CCode (cname = "fatalErrorSAXFunc", has_target = false)]
1730 public delegate void fatalErrorSAXFunc (void* ctx, string msg, ...);
1732 [CCode (cname = "getEntitySAXFunc", has_target = false)]
1733 public delegate Entity* getEntitySAXFunc (void* ctx, [CCode (type = "xmlChar*")] string name);
1735 [CCode (cname = "getParameterEntitySAXFunc", has_target = false)]
1736 public delegate Entity* getParameterEntitySAXFunc (void* ctx, [CCode (type = "xmlChar*")] string name);
1738 [CCode (cname = "hasExternalSubsetSAXFunc", has_target = false)]
1739 public delegate int hasExternalSubsetSAXFunc (void* ctx);
1741 [CCode (cname = "hasInternalSubsetSAXFunc", has_target = false)]
1742 public delegate int hasInternalSubsetSAXFunc (void* ctx);
1744 [CCode (cname = "ignorableWhitespaceSAXFunc", has_target = false)]
1745 public delegate void ignorableWhitespaceSAXFunc (void* ctx, [CCode (type = "xmlChar*")] string ch, int len);
1747 [CCode (cname = "internalSubsetSAXFunc", has_target = false)]
1748 public delegate void internalSubsetSAXFunc (void* ctx, [CCode (type = "xmlChar*")] string name, [CCode (type = "xmlChar*")] string ExternalID, [CCode (type = "xmlChar*")] string SystemID);
1750 [CCode (cname = "isStandaloneSAXFunc", has_target = false)]
1751 public delegate int isStandaloneSAXFunc (void* ctx);
1753 [CCode (cname = "notationDeclSAXFunc", has_target = false)]
1754 public delegate void notationDeclSAXFunc (void* ctx, [CCode (type = "xmlChar*")] string name, [CCode (type = "xmlChar*")] string publicId, [CCode (type = "xmlChar*")] string systemId);
1756 [CCode (cname = "processingInstructionSAXFunc", has_target = false)]
1757 public delegate void processingInstructionSAXFunc (void* ctx, [CCode (type = "xmlChar*")] string target, [CCode (type = "xmlChar*")] string data);
1759 [CCode (cname = "referenceSAXFunc", has_target = false)]
1760 public delegate void referenceSAXFunc (void* ctx, [CCode (type = "xmlChar*")] string name);
1762 // [CCode (cname = "resolveEntitySAXFunc", has_target = false)]
1763 // public delegate ParserInput resolveEntitySAXFunc (void* ctx, [CCode (type = "xmlChar*")] string publicId, [CCode (type = "xmlChar*")] string systemId);
1765 // [CCode (cname = "setDocumentLocatorSAXFunc", has_target = false)]
1766 // public delegate void setDocumentLocatorSAXFunc (void* ctx, SAXLocator loc);
1768 [CCode (cname = "startDocumentSAXFunc", has_target = false)]
1769 public delegate void startDocumentSAXFunc (void* ctx);
1771 [CCode (cname = "startElementNsSAX2Func", has_target = false)]
1772 public delegate void startElementNsSAX2Func (void* ctx, [CCode (type = "xmlChar*")] string localname, [CCode (type = "xmlChar*")] string prefix, [CCode (type = "xmlChar*")] string URI, int nb_namespaces, [CCode (array_length = false, array_null_terminated = true, type = "xmlChar**")] string[] namespaces, int nb_attributes, int nb_defaulted, [CCode (array_length = false, type = "xmlChar**")] string[] attributes);
1774 [CCode (cname = "startElementSAXFunc", has_target = false)]
1775 public delegate void startElementSAXFunc (void* ctx, [CCode (type = "xmlChar*")] string name, [CCode (array_length = false, array_null_terminated = true, type = "xmlChar**")] string[] atts);
1777 [CCode (cname = "unparsedEntityDeclSAXFunc", has_target = false)]
1778 public delegate void unparsedEntityDeclSAXFunc (void* ctx, [CCode (type = "xmlChar*")] string name, [CCode (type = "xmlChar*")] string publicId, [CCode (type = "xmlChar*")] string systemId, [CCode (type = "xmlChar*")] string notationName);
1780 [CCode (cname = "warningSAXFunc", has_target = false)]
1781 public delegate void warningSAXFunc (void* ctx, string msg, ...);
1783 [CCode (cname ="xmlStructuredErrorFunc", has_target = false)]
1784 public delegate void xmlStructuredErrorFunc (void* ctx, Error* error);
1787 [CCode (cname = "xmlSAXHandler", cheader_filename = "libxml/parser.h")]
1788 public struct SAXHandler {
1789 [CCode (cname = "internalSubset")]
1790 public internalSubsetSAXFunc internalSubset;
1791 [CCode (cname = "isStandalone")]
1792 public isStandaloneSAXFunc is_standalone;
1793 [CCode (cname = "hasInternalSubset")]
1794 public hasInternalSubsetSAXFunc hasInternalSubset;
1795 [CCode (cname = "hasExternalSubset")]
1796 public hasExternalSubsetSAXFunc hasExternalSubset;
1797 // public resolveEntitySAXFunc resolveEntity;
1798 [CCode (cname = "getEntity")]
1799 public getEntitySAXFunc getEntity;
1800 [CCode (cname = "entityDecl")]
1801 public entityDeclSAXFunc entityDecl;
1802 [CCode (cname = "notationDecl")]
1803 public notationDeclSAXFunc notationDecl;
1804 [CCode (cname = "attributeDecl")]
1805 public attributeDeclSAXFunc attributeDecl;
1806 [CCode (cname = "elementDecl")]
1807 public elementDeclSAXFunc elementDecl;
1808 [CCode (cname = "unparsedEntityDecl")]
1809 public unparsedEntityDeclSAXFunc unparsedEntityDecl;
1810 // public setDocumentLocatorSAXFunc setDocumentLocator;
1811 [CCode (cname = "startDocument")]
1812 public startDocumentSAXFunc startDocument;
1813 [CCode (cname = "endDocument")]
1814 public endDocumentSAXFunc endDocument;
1815 [CCode (cname = "startElement")]
1816 public startElementSAXFunc startElement;
1817 [CCode (cname = "endElement")]
1818 public endElementSAXFunc endElement;
1819 public referenceSAXFunc reference;
1820 public charactersSAXFunc characters;
1821 [CCode (cname = "ignorableWhitespace")]
1822 public ignorableWhitespaceSAXFunc ignorableWhitespace;
1823 [CCode (cname = "processingInstruction")]
1824 public processingInstructionSAXFunc processingInstruction;
1825 public commentSAXFunc comment;
1826 public warningSAXFunc warning;
1827 public errorSAXFunc error;
1828 [CCode (cname = "fatalError")]
1829 public fatalErrorSAXFunc fatalError;
1830 [CCode (cname = "getParameterEntity")]
1831 public getParameterEntitySAXFunc getParameterEntity;
1832 [CCode (cname = "cdataBlock")]
1833 public cdataBlockSAXFunc cdataBlock;
1834 [CCode (cname = "externalSubset")]
1835 public externalSubsetSAXFunc externalSubset;
1836 public uint initialized;
1837 [CCode (cname = "startElementNs")]
1838 public startElementNsSAX2Func startElementNs;
1839 [CCode (cname = "endElementNs")]
1840 public endElementNsSAX2Func endElementNs;
1841 public xmlStructuredErrorFunc serror;
1843 [CCode (cname = "xmlSAXUserParseMemory")]
1844 public int user_parse_memory (void* user_data, string buffer, int size);
1845 [CCode (cname = "xmlSAXUserParseFile")]
1846 public int user_parse_file (void* user_data, string filename);
1850 /* xmlerror - error handling */
1853 [CCode (cname = "xmlError", cheader_filename = "libxml/xmlerror.h")]
1854 public struct Error {
1857 public string message;
1858 public ErrorLevel level;
1870 [CCode (cname = "xmlErrorLevel", cprefix = "XML_ERR_", cheader_filename = "libxml/xmlerror.h", has_type_id = false)]
1871 public enum ErrorLevel {
1878 [CCode (cname = "xmlGetLastError", cheader_filename = "libxml/xmlerror.h")]
1879 public static Error* get_last_error ();
1881 [CCode (cname = "xmlResetLastError", cheader_filename = "libxml/xmlerror.h")]
1882 public static void reset_last_error ();
1886 [CCode (cname = "htmlIsBooleanAttr", cheader_filename = "libxml/HTMLtree.h")]
1887 public static int is_boolean_attr ([CCode (type = "xmlChar*")] string name);
1889 [CCode (cname = "UTF8ToHtml", cheader_filename = "libxml/HTMLparser.h")]
1890 public static int utf8_to_html ([CCode (array_length = false)] char[] outdata, ref int outlen, [CCode (array_length = false)] char[] indata, ref int inlen);
1892 [CCode (cname = "htmlEncodeEntities", cheader_filename = "libxml/HTMLparser.h")]
1893 public static int encode_entities ([CCode (array_length = false)] char[] outdata, ref int outlen, [CCode (array_length = false)] char[] indata, ref int inlen, char quote_char = '\0');
1895 [CCode (cname = "htmlIsScriptAttribute", cheader_filename = "libxml/HTMLparser.h")]
1896 public static bool is_script_attribute ([CCode (type = "xmlChar*")] string name);
1898 [CCode (cname = "htmlHandleOmittedElem", cheader_filename = "libxml/HTMLparser.h")]
1899 public static bool handle_omitted_elem (bool val);
1901 [CCode (cname = "htmlParserOption", cprefix = "HTML_PARSE_", cheader_filename = "libxml/HTMLparser.h", has_type_id = false)]
1902 public enum ParserOption {
1912 [CCode (cname = "htmlStatus", cprefix = "HTML_", cheader_filename = "libxml/HTMLparser.h", has_type_id = false)]
1913 public enum Status {
1922 [CCode (cname = "xmlNode", cheader_filename = "libxml/HTMLparser.h")]
1923 public class Node : Xml.Node {
1924 [CCode (cname = "htmlNodeStatus")]
1925 public Status status (bool legacy);
1929 [CCode (cname = "xmlDoc", cheader_filename = "libxml/HTMLtree.h,libxml/HTMLparser.h")]
1930 public class Doc : Xml.Doc {
1931 [CCode (cname = "htmlNewDoc")]
1932 public Doc ([CCode (type = "xmlChar*")] string? uri = null, string? external_id = null);
1934 [CCode (cname = "htmlNewDocNoDtD")]
1935 public Doc.new_no_dtd ([CCode (type = "xmlChar*")] string? uri = null, string? external_id = null);
1937 [CCode (cname = "htmlSAXParseDoc")]
1938 public static Doc* sax_parse_doc ([CCode (type = "xmlChar*")] string cur, string? encoding, Xml.SAXHandler* sax, void* user_data = null);
1940 [CCode (cname = "htmlSAXParseFile")]
1941 public static Doc* sax_parse_file (string filename, string? encoding, Xml.SAXHandler* sax, void* user_data = null);
1943 [CCode (cname = "htmlParseFile")]
1944 public static Doc* parse_file (string filename, string? encoding);
1946 [CCode (cname = "htmlReadDoc")]
1947 public static Doc* read_doc ([CCode (type = "xmlChar*")] string cur, string url, string? encoding = null, int options = 0);
1949 [CCode (cname = "htmlReadMemory")]
1950 public static Doc* read_memory ([CCode (array_length = false)] char[] buffer, int size, string url, string? encoding = null, int options = 0);
1952 [CCode (cname = "htmlReadFd")]
1953 public static Doc* read_fd (int fd, string url, string? encoding = null, int options = 0);
1955 [CCode (cname = "htmlReadIO")]
1956 public static Doc* read_io (Xml.InputReadCallback ioread, Xml.InputCloseCallback ioclose, void* ioctx, string url, string? encoding = null, int options = 0);
1958 [CCode (cname = "htmlGetMetaEncoding", type = "xmlChar*")]
1959 public string get_meta_encoding ();
1961 [CCode (cname = "htmlSetMetaEncoding")]
1962 public int set_meta_encoding ([CCode (type = "xmlChar*")] string encoding);
1964 [CCode (cname = "htmlDocDumpMemory")]
1965 public void dump_memory ([CCode (type = "xmlChar**")] out string mem, out int len = null);
1967 [CCode (cname = "htmlDocDumpMemoryFormat")]
1968 public void dump_memory_format ([CCode (type = "xmlChar**")] out string mem, out int len = null, bool format = true);
1970 [CCode (cname = "htmlDocDump", instance_pos = -1)]
1972 public int dump (Posix.FILE f);
1974 public int dump (GLib.FileStream f);
1977 [CCode (cname = "htmlSaveFile", instance_pos = -1)]
1978 public int save_file (string filename);
1980 [CCode (cname = "htmlNodeDumpFile", instance_pos = 1.1)]
1982 public int node_dump_file (Posix.FILE file, Xml.Node* node);
1984 public int node_dump_file (GLib.FileStream file, Xml.Node* node);
1987 [CCode (cname = "htmlNodeDumpFileFormat", instance_pos = 1.1)]
1989 public int node_dump_file_format (Posix.FILE file, string enc = "UTF-8", bool format = true);
1991 public int node_dump_file_format (GLib.FileStream file, string enc = "UTF-8", bool format = true);
1994 [CCode (cname = "htmlSaveFileEnc", instance_pos = 1.1)]
1995 public int save_file_enc (string filename, string enc = "UTF-8");
1997 [CCode (cname = "htmlSaveFileFormat", instance_pos = 1.1)]
1998 public int save_file_format (string filename, string enc = "UTF-8", bool format = true);
2000 [CCode (cname = "htmlIsAutoClosed")]
2001 public bool is_auto_closed (Node* elem);
2003 [CCode (cname = "htmlAutoCloseTag")]
2004 public bool auto_close_tag ([CCode (type = "xmlChar*")] string name, Node* elem);
2008 [CCode (cname = "htmlElemDesc", cheader_filename = "libxml/HTMLparser.h")]
2009 public class ElemDesc {
2010 public weak string name;
2011 [CCode (cname = "startTag")]
2012 public bool start_tag;
2013 [CCode (cname = "endTag")]
2014 public bool end_tag;
2015 [CCode (cname = "saveEndTag")]
2016 public bool save_end_tag;
2020 public bool isinline;
2021 public weak string desc;
2022 public weak string[] subelts;
2023 public weak string defaultsubelt;
2024 public weak string[] attrs_opt;
2025 public weak string[] attrs_depr;
2026 public weak string[] attrs_req;
2028 [CCode (cname = "htmlTagLookup")]
2029 public static ElemDesc* tag_lookup ([CCode (type = "xmlChar*")] string tag);
2031 [CCode (cname = "htmlAttrAllowed")]
2032 public Status attr_allowed ([CCode (type = "xmlChar*")] string attr, bool legacy);
2034 [CCode (cname = "htmlElementAllowedHere")]
2035 public bool allowed_here ([CCode (type = "xmlChar*")] string elt);
2037 [CCode (cname = "htmlElementAllowedHereDesc")]
2038 public bool allowed_here_desc (ElemDesc* child);
2040 [CCode (cname = "htmlElementStatusHere")]
2041 public Status status_here (ElemDesc* child);
2043 [Ccode (cname = "htmlDefaultSubelement")]
2044 public unowned string default_subelement ();
2046 [Ccode (cname = "htmlRequiredAttrs")]
2047 public unowned string[] required_attrs ();
2051 [CCode (cname = "htmlEntityDesc", cheader_filename = "libxml/HTMLParser.h")]
2052 public class EntityDesc
2055 public weak string name;
2056 public weak string desc;
2058 [CCode (cname = "htmlEntityLookup")]
2059 public static EntityDesc* lookup ([CCode (type = "xmlChar*")] string name);
2061 [CCode (cname = "htmlEntityValueLookup")]
2062 public static EntityDesc* value_lookup (uint value);
2066 [CCode (cname = "htmlParserCtxt", free_function = "htmlFreeParserCtxt", cheader_filename = "libxml/HTMLparser.h")]
2067 public class ParserCtxt : Xml.ParserCtxt {
2068 [CCode (cname = "htmlNewParserCtxt")]
2069 public ParserCtxt ();
2071 [CCode (cname = "htmlCreateMemoryParserCtxt")]
2072 public ParserCtxt.create_memory ([CCode (array_length = false)] char[] buffer, int size);
2074 [CCode (cname = "htmlCreatePushParserCtxt")]
2075 public ParserCtxt.create_push (Xml.SAXHandler* sax, void* user_data, [CCode (array_length = false)] char[] data, int len, string? filename = null, Xml.CharEncoding enc = Xml.CharEncoding.NONE);
2077 [CCode (cname = "htmlParseChunk")]
2078 public int parse_chunk ([CCode (array_length = false)] char[] data, int size, bool terminate);
2080 [CCode (cname = "htmlParseEntityRef")]
2081 public EntityDesc* parse_entity_ref ([CCode (type = "xmlChar**")] out string entity_name);
2083 [CCode (cname = "htmlParseCharRef")]
2084 public int parse_char_ref ();
2086 [CCode (cname = "htmlParseElement")]
2087 public void parse_element ();
2089 [CCode (cname = "htmlParseDocument")]
2090 public int parse_document ();
2092 [CCode (cname = "htmlCtxtReset")]
2093 public void reset ();
2095 [CCode (cname = "htmlCtxtUseOptions")]
2096 public int use_options (int options);
2098 [CCode (cname = "htmlCtxtReadDoc")]
2099 public Doc* read_doc ([CCode (type = "xmlChar*")] string cur, string url, string? encoding = null, int options = 0);
2101 [CCode (cname = "htmlCtxtReadFile")]
2102 public Doc* read_file (string filename, string? encoding = null, int options = 0);
2104 [CCode (cname = "htmlCtxtReadMemory")]
2105 public Doc* read_memory ([CCode (array_length = false)] char[] buffer, int size, string url, string? encoding = null, int options = 0);
2107 [CCode (cname = "htmlCtxtReadFd")]
2108 public Doc* read_fd (int fd, string url, string? encoding = null, int options = 0);
2110 [CCode (cname = "htmlCtxtReadIO")]
2111 public Doc* read_io (Xml.InputReadCallback ioread, Xml.InputCloseCallback ioclose, void* ioctx, string url, string? encoding = null, int options = 0);