864
919
public TextReader.filename (string uri);
866
921
[CCode (cname = "xmlReaderForDoc")]
867
public TextReader.for_doc (string cur, string url, string? encoding, int options);
922
public TextReader.for_doc (string cur, string url, string? encoding = null, int options = 0);
869
924
[CCode (cname = "xmlReaderForFd")]
870
public TextReader.for_fd (int fd, string url, string? encoding, int options);
925
public TextReader.for_fd (int fd, string url, string? encoding = null, int options = 0);
872
927
[CCode (cname = "xmlReaderForFile")]
873
public TextReader.for_file (string filename, string? encoding, int options);
928
public TextReader.for_file (string filename, string? encoding = null, int options = 0);
875
930
[CCode (cname = "xmlReaderForIO")]
876
public TextReader.for_io (InputReadCallback ioread, InputCloseCallback ioclose, void* ioctx, string url, string encoding, int options);
931
public TextReader.for_io (InputReadCallback ioread, InputCloseCallback ioclose, void* ioctx, string url, string? encoding = null, int options = 0);
878
933
[CCode (cname = "xmlReaderForMemory")]
879
public TextReader.for_memory ([CCode (array_length = false)] char[] buffer, int size, string url, string encoding, int options);
934
public TextReader.for_memory ([CCode (array_length = false)] char[] buffer, int size, string url, string? encoding = null, int options = 0);
881
936
[CCode (cname = "xmlReaderNewDoc")]
882
public int new_doc (string cur, string url, string? encoding, int options);
937
public int new_doc (string cur, string url, string? encoding = null, int options = 0);
884
939
[CCode (cname = "xmlReaderNewFd")]
885
public int new_fd (int fd, string url, string? encoding, int options);
940
public int new_fd (int fd, string url, string? encoding = null, int options = 0);
887
942
[CCode (cname = "xmlReaderNewFile")]
888
public int new_file (string filename, string? encoding, int options);
943
public int new_file (string filename, string? encoding = null, int options = 0);
890
945
[CCode (cname = "xmlReaderNewIO")]
891
public int new_io (InputReadCallback ioread, InputCloseCallback ioclose, void* ioctx, string url, string encoding, int options);
946
public int new_io (InputReadCallback ioread, InputCloseCallback ioclose, void* ioctx, string url, string? encoding = null, int options = 0);
893
948
[CCode (cname = "xmlReaderNewMemory")]
894
public int new_memory ([CCode (array_length = false)] char[] buffer, int size, string url, string? encoding, int options);
949
public int new_memory ([CCode (array_length = false)] char[] buffer, int size, string url, string? encoding = null, int options = 0);
896
951
[CCode (cname = "xmlReaderNewWalker")]
897
952
public int new_walker (Doc* doc);
1110
1166
namespace XPath {
1111
1167
[CCode (cname = "xmlXPathOrderDocElems")]
1112
1168
public static long order_doc_elements (Doc* doc);
1116
[CCode (cname = "xmlNodeSet", cheader_filename = "libxml/xpath.h")]
1117
public class NodeSet {
1118
[CCode (cname = "xmlXPathNodeSetGetLength")]
1119
public int length ();
1121
[CCode (cname = "xmlXPathNodeSetIsEmpty")]
1122
public bool is_empty ();
1124
[CCode (cname = "xmlXPathNodeSetItem")]
1125
public Node* item (int index);
1129
[CCode (cname = "xmlXPathContext", free_function = "xmlXPathFreeContext", cheader_filename = "libxml/xpath.h")]
1130
public class XPathContext {
1134
[CCode (cname = "xmlXPathContextSetCache")]
1135
public int set_cache (int active, int value, int options);
1137
[CCode (cname = "xmlXPathEval", instance_pos = -1)]
1138
public XPathObject* eval (string str);
1140
[CCode (cname = "xmlXPathEvalExpression", instance_pos = -1)]
1141
public XPathObject* eval_expression (string str);
1143
[CCode (cname = "xmlXPathRegisterNs")]
1144
public int register_ns (string prefix, string ns_uri);
1146
[CCode (cname = "xmlXPathNewContext")]
1147
public XPathContext (Doc* doc);
1150
[CCode (cname = "xmlXPathError", cprefix = "", cheader_filename = "libxml/xpath.h")]
1151
public enum XPathError {
1152
XPATH_EXPRESSION_OK,
1154
XPATH_UNFINISHED_LITERAL_ERROR,
1155
XPATH_START_LITERAL_ERROR,
1156
XPATH_VARIABLE_REF_ERROR,
1157
XPATH_UNDEF_VARIABLE_ERROR,
1158
XPATH_INVALID_PREDICATE_ERROR,
1160
XPATH_UNCLOSED_ERROR,
1161
XPATH_UNKNOWN_FUNC_ERROR,
1162
XPATH_INVALID_OPERAND,
1164
XPATH_INVALID_ARITY,
1165
XPATH_INVALID_CTXT_SIZE,
1166
XPATH_INVALID_CTXT_POSITION,
1169
XPTR_RESOURCE_ERROR,
1170
XPTR_SUB_RESOURCE_ERROR,
1171
XPATH_UNDEF_PREFIX_ERROR,
1172
XPATH_ENCODING_ERROR,
1173
XPATH_INVALID_CHAR_ERROR,
1178
[CCode (cname = "xmlXPathObject", cheader_filename = "libxml/xpath.h")]
1179
public class XPathObject {
1180
public XPathObjectType type;
1181
public NodeSet* nodesetval;
1183
public double floatval;
1184
public string stringval;
1191
[CCode (cname = "xmlXPathObjectType", cprefix = "XPATH_", cheader_filename = "libxml/xpath.h")]
1192
public enum XPathObjectType {
1171
[CCode (cname = "xmlNodeSet", cheader_filename = "libxml/xpath.h")]
1172
public class NodeSet {
1173
[CCode (cname = "xmlXPathNodeSetGetLength")]
1174
public int length ();
1176
[CCode (cname = "xmlXPathNodeSetIsEmpty")]
1177
public bool is_empty ();
1179
[CCode (cname = "xmlXPathNodeSetItem")]
1180
public Node* item (int index);
1184
[CCode (cname = "xmlXPathContext", free_function = "xmlXPathFreeContext", cheader_filename = "libxml/xpath.h")]
1185
public class Context {
1189
[CCode (cname = "xmlXPathContextSetCache")]
1190
public int set_cache (int active, int value, int options);
1192
[CCode (cname = "xmlXPathEval", instance_pos = -1)]
1193
public Object* eval (string str);
1195
[CCode (cname = "xmlXPathEvalExpression", instance_pos = -1)]
1196
public Object* eval_expression (string str);
1198
[CCode (cname = "xmlXPathRegisterNs")]
1199
public int register_ns (string prefix, string ns_uri);
1201
[CCode (cname = "xmlXPathNewContext")]
1202
public Context (Doc* doc);
1205
[CCode (cname = "xmlXPathError", cprefix = "XPATH_", cheader_filename = "libxml/xpath.h")]
1209
UNFINISHED_LITERAL_ERROR,
1210
START_LITERAL_ERROR,
1212
UNDEF_VARIABLE_ERROR,
1213
INVALID_PREDICATE_ERROR,
1221
INVALID_CTXT_POSITION,
1223
[CCode (cname = "XPTR_SYNTAX_ERROR")]
1225
[CCode (cname = "XPTR_RESOURCE_ERROR")]
1226
XPTR_RESOURCE_ERROR,
1227
[CCode (cname = "XPTR_SUB_RESOURCE_ERROR")]
1228
XPTR_SUB_RESOURCE_ERROR,
1236
[CCode (cname = "xmlXPathObject", cheader_filename = "libxml/xpath.h")]
1237
public class Object {
1238
public ObjectType type;
1239
public NodeSet* nodesetval;
1241
public double floatval;
1242
public string stringval;
1249
[CCode (cname = "xmlXPathObjectType", cprefix = "XPATH_", cheader_filename = "libxml/xpath.h")]
1250
public enum ObjectType {
1206
1264
/* SAX CALLBACKS */
1208
[CCode (cname = "attributeDeclSAXFunc")]
1209
public static delegate void attributeDeclSAXFunc (void* ctx, string elem, string fullname, int type, int def, string defaultValue, Enumeration* tree);
1211
[CCode (cname = "attributeSAXFunc")]
1212
public static delegate void attributeSAXFunc (void* ctx, string name, string value);
1214
[CCode (cname = "cdataBlockSAXFunc")]
1215
public static delegate void cdataBlockSAXFunc (void* ctx, string value, int len);
1217
[CCode (cname = "charactersSAXFunc")]
1218
public static delegate void charactersSAXFunc (void* ctx, string ch, int len);
1220
[CCode (cname = "commentsSAXFunc")]
1221
public static delegate void commentSAXFunc (void* ctx, string value);
1223
[CCode (cname = "elementDeclSAXFunc")]
1224
public static delegate void elementDeclSAXFunc (void* ctx, string name, int type, ElementContent content);
1226
[CCode (cname = "endDocumentSAXFunc")]
1227
public static delegate void endDocumentSAXFunc (void* ctx);
1229
[CCode (cname = "endElementNsSAX2Func")]
1230
public static delegate void endElementNsSAX2Func (void* ctx, string localname, string prefix, string URI);
1232
[CCode (cname = "endElementSAXFunc")]
1233
public static delegate void endElementSAXFunc (void* ctx, string name);
1235
[CCode (cname = "entityDeclSAXFunc")]
1236
public static delegate void entityDeclSAXFunc (void* ctx, string name, int type, string publicId, string systemId, string content);
1238
[CCode (cname = "errorSAXFunc")]
1239
public static delegate void errorSAXFunc (void* ctx, string msg, ...);
1241
[CCode (cname = "externalSubsetSAXFunc")]
1242
public static delegate void externalSubsetSAXFunc (void* ctx, string name, string ExternalID, string SystemID);
1244
[CCode (cname = "fatalErrorSAXFunc")]
1245
public static delegate void fatalErrorSAXFunc (void* ctx, string msg, ...);
1247
[CCode (cname = "getEntitySAXFunc")]
1248
public static delegate Entity* getEntitySAXFunc (void* ctx, string name);
1250
[CCode (cname = "getParameterEntitySAXFunc")]
1251
public static delegate Entity* getParameterEntitySAXFunc (void* ctx, string name);
1253
[CCode (cname = "hasExternalSubsetSAXFunc")]
1254
public static delegate int hasExternalSubsetSAXFunc (void* ctx);
1256
[CCode (cname = "hasInternalSubsetSAXFunc")]
1257
public static delegate int hasInternalSubsetSAXFunc (void* ctx);
1259
[CCode (cname = "ignorableWhitespaceSAXFunc")]
1260
public static delegate void ignorableWhitespaceSAXFunc (void* ctx, string ch, int len);
1262
[CCode (cname = "internalSubsetSAXFunc")]
1263
public static delegate void internalSubsetSAXFunc (void* ctx, string name, string ExternalID, string SystemID);
1265
[CCode (cname = "isStandaloneSAXFunc")]
1266
public static delegate int isStandaloneSAXFunc (void* ctx);
1268
[CCode (cname = "notationDeclSAXFunc")]
1269
public static delegate void notationDeclSAXFunc (void* ctx, string name, string publicId, string systemId);
1271
[CCode (cname = "processingInstructionSAXFunc")]
1272
public static delegate void processingInstructionSAXFunc (void* ctx, string target, string data);
1274
[CCode (cname = "referenceSAXFunc")]
1275
public static delegate void referenceSAXFunc (void* ctx, string name);
1277
// [CCode (cname = "resolveEntitySAXFunc")]
1278
// public static delegate ParserInput resolveEntitySAXFunc (void* ctx, string publicId, string systemId);
1280
// [CCode (cname = "setDocumentLocatorSAXFunc")]
1281
// public static delegate void setDocumentLocatorSAXFunc (void* ctx, SAXLocator loc);
1283
[CCode (cname = "startDocumentSAXFunc")]
1284
public static delegate void startDocumentSAXFunc (void* ctx);
1286
[CCode (cname = "startElementNsSAX2Func")]
1287
public static delegate void startElementNsSAX2Func (void* ctx, string localname, string prefix, string URI, int nb_namespaces, [CCode (array_length = false)] string[] namespaces, int nb_attributes, int nb_defaulted, [CCode (array_length = false)] string[] attributes);
1289
[CCode (cname = "startElementSAXFunc")]
1290
public static delegate void startElementSAXFunc (void* ctx, string name, [CCode (array_length = false)] string[] atts);
1292
[CCode (cname = "unparsedEntityDeclSAXFunc")]
1293
public static delegate void unparsedEntityDeclSAXFunc (void* ctx, string name, string publicId, string systemId, string notationName);
1295
[CCode (cname = "warningSAXFunc")]
1296
public static delegate void warningSAXFunc (void* ctx, string msg, ...);
1298
[CCode (cname ="xmlStructuredErrorFunc")]
1299
public static delegate void xmlStructuredErrorFunc (void* ctx, Error* error);
1266
[CCode (cname = "attributeDeclSAXFunc", has_target = false)]
1267
public delegate void attributeDeclSAXFunc (void* ctx, string elem, string fullname, int type, int def, string defaultValue, Enumeration* tree);
1269
[CCode (cname = "attributeSAXFunc", has_target = false)]
1270
public delegate void attributeSAXFunc (void* ctx, string name, string value);
1272
[CCode (cname = "cdataBlockSAXFunc", has_target = false)]
1273
public delegate void cdataBlockSAXFunc (void* ctx, string value, int len);
1275
[CCode (cname = "charactersSAXFunc", has_target = false)]
1276
public delegate void charactersSAXFunc (void* ctx, string ch, int len);
1278
[CCode (cname = "commentsSAXFunc", has_target = false)]
1279
public delegate void commentSAXFunc (void* ctx, string value);
1281
[CCode (cname = "elementDeclSAXFunc", has_target = false)]
1282
public delegate void elementDeclSAXFunc (void* ctx, string name, int type, ElementContent content);
1284
[CCode (cname = "endDocumentSAXFunc", has_target = false)]
1285
public delegate void endDocumentSAXFunc (void* ctx);
1287
[CCode (cname = "endElementNsSAX2Func", has_target = false)]
1288
public delegate void endElementNsSAX2Func (void* ctx, string localname, string prefix, string URI);
1290
[CCode (cname = "endElementSAXFunc", has_target = false)]
1291
public delegate void endElementSAXFunc (void* ctx, string name);
1293
[CCode (cname = "entityDeclSAXFunc", has_target = false)]
1294
public delegate void entityDeclSAXFunc (void* ctx, string name, int type, string publicId, string systemId, string content);
1296
[CCode (cname = "errorSAXFunc", has_target = false)]
1297
public delegate void errorSAXFunc (void* ctx, string msg, ...);
1299
[CCode (cname = "externalSubsetSAXFunc", has_target = false)]
1300
public delegate void externalSubsetSAXFunc (void* ctx, string name, string ExternalID, string SystemID);
1302
[CCode (cname = "fatalErrorSAXFunc", has_target = false)]
1303
public delegate void fatalErrorSAXFunc (void* ctx, string msg, ...);
1305
[CCode (cname = "getEntitySAXFunc", has_target = false)]
1306
public delegate Entity* getEntitySAXFunc (void* ctx, string name);
1308
[CCode (cname = "getParameterEntitySAXFunc", has_target = false)]
1309
public delegate Entity* getParameterEntitySAXFunc (void* ctx, string name);
1311
[CCode (cname = "hasExternalSubsetSAXFunc", has_target = false)]
1312
public delegate int hasExternalSubsetSAXFunc (void* ctx);
1314
[CCode (cname = "hasInternalSubsetSAXFunc", has_target = false)]
1315
public delegate int hasInternalSubsetSAXFunc (void* ctx);
1317
[CCode (cname = "ignorableWhitespaceSAXFunc", has_target = false)]
1318
public delegate void ignorableWhitespaceSAXFunc (void* ctx, string ch, int len);
1320
[CCode (cname = "internalSubsetSAXFunc", has_target = false)]
1321
public delegate void internalSubsetSAXFunc (void* ctx, string name, string ExternalID, string SystemID);
1323
[CCode (cname = "isStandaloneSAXFunc", has_target = false)]
1324
public delegate int isStandaloneSAXFunc (void* ctx);
1326
[CCode (cname = "notationDeclSAXFunc", has_target = false)]
1327
public delegate void notationDeclSAXFunc (void* ctx, string name, string publicId, string systemId);
1329
[CCode (cname = "processingInstructionSAXFunc", has_target = false)]
1330
public delegate void processingInstructionSAXFunc (void* ctx, string target, string data);
1332
[CCode (cname = "referenceSAXFunc", has_target = false)]
1333
public delegate void referenceSAXFunc (void* ctx, string name);
1335
// [CCode (cname = "resolveEntitySAXFunc", has_target = false)]
1336
// public delegate ParserInput resolveEntitySAXFunc (void* ctx, string publicId, string systemId);
1338
// [CCode (cname = "setDocumentLocatorSAXFunc", has_target = false)]
1339
// public delegate void setDocumentLocatorSAXFunc (void* ctx, SAXLocator loc);
1341
[CCode (cname = "startDocumentSAXFunc", has_target = false)]
1342
public delegate void startDocumentSAXFunc (void* ctx);
1344
[CCode (cname = "startElementNsSAX2Func", has_target = false)]
1345
public 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);
1347
[CCode (cname = "startElementSAXFunc", has_target = false)]
1348
public delegate void startElementSAXFunc (void* ctx, string name, [CCode (array_length = false)] string[] atts);
1350
[CCode (cname = "unparsedEntityDeclSAXFunc", has_target = false)]
1351
public delegate void unparsedEntityDeclSAXFunc (void* ctx, string name, string publicId, string systemId, string notationName);
1353
[CCode (cname = "warningSAXFunc", has_target = false)]
1354
public delegate void warningSAXFunc (void* ctx, string msg, ...);
1356
[CCode (cname ="xmlStructuredErrorFunc", has_target = false)]
1357
public delegate void xmlStructuredErrorFunc (void* ctx, Error* error);
1302
1360
[CCode (cname = "xmlSAXHandler")]
1303
1361
public struct SAXHandler {
1362
[CCode (cname = "internalSubset")]
1304
1363
public internalSubsetSAXFunc internalSubset;
1305
public isStandaloneSAXFunc isStandalone;
1364
[CCode (cname = "isStandalone")]
1365
public isStandaloneSAXFunc is_standalone;
1366
[CCode (cname = "hasInternalSubset")]
1306
1367
public hasInternalSubsetSAXFunc hasInternalSubset;
1368
[CCode (cname = "hasExternalSubset")]
1307
1369
public hasExternalSubsetSAXFunc hasExternalSubset;
1308
1370
// public resolveEntitySAXFunc resolveEntity;
1371
[CCode (cname = "getEntity")]
1309
1372
public getEntitySAXFunc getEntity;
1373
[CCode (cname = "entityDecl")]
1310
1374
public entityDeclSAXFunc entityDecl;
1375
[CCode (cname = "notationDecl")]
1311
1376
public notationDeclSAXFunc notationDecl;
1377
[CCode (cname = "attributeDecl")]
1312
1378
public attributeDeclSAXFunc attributeDecl;
1379
[CCode (cname = "elementDecl")]
1313
1380
public elementDeclSAXFunc elementDecl;
1381
[CCode (cname = "unparsedEntityDecl")]
1314
1382
public unparsedEntityDeclSAXFunc unparsedEntityDecl;
1315
1383
// public setDocumentLocatorSAXFunc setDocumentLocator;
1384
[CCode (cname = "startDocument")]
1316
1385
public startDocumentSAXFunc startDocument;
1386
[CCode (cname = "endDocument")]
1317
1387
public endDocumentSAXFunc endDocument;
1388
[CCode (cname = "startElement")]
1318
1389
public startElementSAXFunc startElement;
1390
[CCode (cname = "endElement")]
1319
1391
public endElementSAXFunc endElement;
1320
1392
public referenceSAXFunc reference;
1321
1393
public charactersSAXFunc characters;
1394
[CCode (cname = "ignorableWhitespace")]
1322
1395
public ignorableWhitespaceSAXFunc ignorableWhitespace;
1396
[CCode (cname = "processingInstruction")]
1323
1397
public processingInstructionSAXFunc processingInstruction;
1324
1398
public commentSAXFunc comment;
1325
1399
public warningSAXFunc warning;
1326
1400
public errorSAXFunc error;
1401
[CCode (cname = "fatalError")]
1327
1402
public fatalErrorSAXFunc fatalError;
1403
[CCode (cname = "getParameterEntity")]
1328
1404
public getParameterEntitySAXFunc getParameterEntity;
1405
[CCode (cname = "cdataBlock")]
1329
1406
public cdataBlockSAXFunc cdataBlock;
1407
[CCode (cname = "externalSubset")]
1330
1408
public externalSubsetSAXFunc externalSubset;
1331
1409
public uint initialized;
1410
[CCode (cname = "startElementNs")]
1332
1411
public startElementNsSAX2Func startElementNs;
1412
[CCode (cname = "endElementNs")]
1333
1413
public endElementNsSAX2Func endElementNs;
1334
1414
public xmlStructuredErrorFunc serror;
1337
[CCode (lower_case_cprefix = "xmlSAX")]
1338
namespace SAXParser {
1339
public int UserParseMemory (SAXHandler* sax, void* user_data, string buffer, int size);
1340
public int UserParseFile (SAXHandler* sax, void* user_data, string filename);
1416
[CCode (cname = "UserParseMemory")]
1417
public int user_parse_memory (void* user_data, string buffer, int size);
1418
[CCode (cname = "UserParseFile")]
1419
public int user_parse_file (void* user_data, string filename);
1454
[CCode (cname = "htmlIsBooleanAttr", cheader_filename = "libxml/HTMLtree.h")]
1455
public static int is_boolean_attr (string name);
1457
[CCode (cname = "UTF8ToHtml", cheader_filename = "libxml/HTMLparser.h")]
1458
public static int utf8_to_html ([CCode (array_length = false)] char[] outdata, out int outlen, [CCode (array_length = false)] char[] indata, out int inlen);
1460
[CCode (cname = "htmlEncodeEntities", cheader_filename = "libxml/HTMLparser.h")]
1461
public static int encode_entities ([CCode (array_length = false)] char[] outdata, out int outlen, [CCode (array_length = false)] char[] indata, out int inlen, char quote_char = '\0');
1463
[CCode (cname = "htmlIsScriptAttribute", cheader_filename = "libxml/HTMLparser.h")]
1464
public static bool is_script_attribute (string name);
1466
[CCode (cname = "htmlHandleOmittedElem", cheader_filename = "libxml/HTMLparser.h")]
1467
public static bool handle_omitted_elem (bool val);
1469
[CCode (cname = "htmlParserOption", cprefix = "HTML_PARSE_", cheader_filename = "libxml/HTMLparser.h")]
1470
public enum ParserOption {
1480
[CCode (cname = "htmlStatus", cprefix = "HTML_", cheader_filename = "libxml/HTMLparser.h")]
1481
public enum Status {
1490
[CCode (cname = "xmlNode", cheader_filename = "libxml/HTMLparser.h")]
1491
public class Node : Xml.Node {
1492
[CCode (cname = "htmlNodeStatus")]
1493
public Status status (bool legacy);
1497
[CCode (cname = "xmlDoc", cheader_filename = "libxml/HTMLtree.h,libxml/HTMLparser.h")]
1498
public class Doc : Xml.Doc {
1499
[CCode (cname = "htmlNewDoc")]
1500
public Doc (string? uri = null, string? external_id = null);
1502
[CCode (cname = "htmlNewNoDtD")]
1503
public Doc.new_no_dtd (string? uri = null, string? external_id = null);
1505
[CCode (cname = "htmlSAXParseDoc")]
1506
public static Doc* sax_parse_doc (string cur, string? encoding, Xml.SAXHandler* sax, void* user_data = null);
1508
[CCode (cname = "htmlSAXParseFile")]
1509
public static Doc* sax_parse_file (string filename, string? encoding, Xml.SAXHandler* sax, void* user_data = null);
1511
[CCode (cname = "htmlParseFile")]
1512
public static Doc* parse_file (string filename, string? encoding);
1514
[CCode (cname = "htmlReadDoc")]
1515
public static Doc* read_doc (string cur, string url, string? encoding = null, int options = 0);
1517
[CCode (cname = "htmlReadMemory")]
1518
public static Doc* read_memory ([CCode (array_length = false)] char[] buffer, int size, string url, string? encoding = null, int options = 0);
1520
[CCode (cname = "htmlReadFd")]
1521
public static Doc* read_fd (int fd, string url, string? encoding = null, int options = 0);
1523
[CCode (cname = "htmlReadIO")]
1524
public static Doc* read_io (Xml.InputReadCallback ioread, Xml.InputCloseCallback ioclose, void* ioctx, string url, string? encoding = null, int options = 0);
1526
[CCode (cname = "htmlGetMetaEncoding")]
1527
public string get_meta_encoding ();
1529
[CCode (cname = "htmlSetMetaEncoding")]
1530
public int set_meta_encoding (string encoding);
1532
[CCode (cname = "htmlDocDumpMemory")]
1533
public void dump_memory (out string mem, out int len = null);
1535
[CCode (cname = "htmlDocDumpMemoryFormat")]
1536
public void dump_memory_format (out string mem, out int len = null, bool format = true);
1538
[CCode (cname = "htmlDocDump", instance_pos = -1)]
1540
public int dump (Posix.FILE f);
1542
public int dump (GLib.FileStream f);
1545
[CCode (cname = "htmlSaveFile", instance_pos = -1)]
1546
public int save_file (string filename);
1548
[CCode (cname = "htmlNodeDumpFile", instance_pos = 2)]
1550
public int node_dump_file (Posix.FILE file, Xml.Node* node);
1552
public int node_dump_file (GLib.FileStream file, Xml.Node* node);
1555
[CCode (cname = "htmlNodeDumpFileFormat", instance_pos = 2)]
1557
public int node_dump_file_format (Posix.FILE file, string enc = "UTF-8", bool format = true);
1559
public int node_dump_file_format (GLib.FileStream file, string enc = "UTF-8", bool format = true);
1562
[CCode (cname = "htmlSaveFileEnc", instance_pos = 2)]
1563
public int save_file_enc (string filename, string enc = "UTF-8");
1565
[CCode (cname = "htmlSaveFileFormat", instance_pos = 2)]
1566
public int save_file_format (string filename, string enc = "UTF-8", bool format = true);
1568
[CCode (cname = "htmlIsAutoClosed")]
1569
public bool is_auto_closed (Node* elem);
1571
[CCode (cname = "htmlAutoCloseTag")]
1572
public bool auto_close_tag (string name, Node* elem);
1576
[CCode (cname = "htmlElemDesc", cheader_filename = "libxml/HTMLparser.h")]
1577
public class ElemDesc {
1578
public weak string name;
1579
[CCode (cname = "startTag")]
1580
public bool start_tag;
1581
[CCode (cname = "endTag")]
1582
public bool end_tag;
1583
[CCode (cname = "saveEndTag")]
1584
public bool save_end_tag;
1588
public bool isinline;
1589
public weak string desc;
1590
public weak string[] subelts;
1591
public weak string defaultsubelt;
1592
public weak string[] attrs_opt;
1593
public weak string[] attrs_depr;
1594
public weak string[] attrs_req;
1596
[CCode (cname = "htmlTagLookup")]
1597
public static ElemDesc* tag_lookup (string tag);
1599
[CCode (cname = "htmlAttrAllowed")]
1600
public Status attr_allowed (string attr, bool legacy);
1602
[CCode (cname = "htmlElementAllowedHere")]
1603
public bool allowed_here (string elt);
1605
[CCode (cname = "htmlElementAllowedHereDesc")]
1606
public bool allowed_here_desc (ElemDesc* child);
1608
[CCode (cname = "htmlElementStatusHere")]
1609
public Status status_here (ElemDesc* child);
1611
[Ccode (cname = "htmlDefaultSubelement")]
1612
public weak string default_subelement ();
1614
[Ccode (cname = "htmlRequiredAttrs")]
1615
public weak string[] required_attrs ();
1619
[CCode (cname = "htmlEntityDesc", cheader_filename = "libxml/HTMLParser.h")]
1620
public class EntityDesc
1623
public weak string name;
1624
public weak string desc;
1626
[CCode (cname = "htmlEntityDesc")]
1627
public static EntityDesc* lookup (string name);
1629
[CCode (cname = "htmlEntityValueDesc")]
1630
public static EntityDesc* value_lookup (uint value);
1634
[CCode (cname = "htmlParserCtxt", free_function = "htmlFreeParserCtxt", cheader_filename = "libxml/HTMLparser.h")]
1635
public class ParserCtxt : Xml.ParserCtxt {
1636
[CCode (cname = "htmlNewParserCtxt")]
1637
public ParserCtxt ();
1639
[CCode (cname = "htmlCreateMemoryParserCtxt")]
1640
public ParserCtxt.create_memory ([CCode (array_length = false)] char[] buffer, int size);
1642
[CCode (cname = "htmlCreatePushParserCtxt")]
1643
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);
1645
[CCode (cname = "htmlParseChunk")]
1646
public int parse_chunk ([CCode (array_length = false)] char[] data, int size, bool terminate);
1648
[CCode (cname = "htmlParseEntityRef")]
1649
public EntityDesc* parse_entity_ref (out string entity_name);
1651
[CCode (cname = "htmlParseCharRef")]
1652
public int parse_char_ref ();
1654
[CCode (cname = "htmlParseElement")]
1655
public void parse_element ();
1657
[CCode (cname = "htmlParseDocument")]
1658
public int parse_document ();
1660
[CCode (cname = "htmlCtxtReset")]
1661
public void reset ();
1663
[CCode (cname = "htmlCtxtUseOptions")]
1664
public int use_options (int options);
1666
[CCode (cname = "htmlCtxtReadDoc")]
1667
public Doc* read_doc (string cur, string url, string? encoding = null, int options = 0);
1669
[CCode (cname = "htmlCtxtReadFile")]
1670
public Doc* read_file (string filename, string? encoding = null, int options = 0);
1672
[CCode (cname = "htmlCtxtReadMemory")]
1673
public Doc* read_memory ([CCode (array_length = false)] char[] buffer, int size, string url, string? encoding = null, int options = 0);
1675
[CCode (cname = "htmlCtxtReadFd")]
1676
public Doc* read_fd (int fd, string url, string? encoding = null, int options = 0);
1678
[CCode (cname = "htmlCtxtReadIO")]
1679
public Doc* read_io (Xml.InputReadCallback ioread, Xml.InputCloseCallback ioclose, void* ioctx, string url, string? encoding = null, int options = 0);