[vala] libxml-2.0: add support for TextWriter
- From: Evan Nemerson <evann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] libxml-2.0: add support for TextWriter
- Date: Tue, 23 Mar 2010 09:20:57 +0000 (UTC)
commit deb6e10007e6ac2bca73e524604ba0ceeff3efb8
Author: Tomaž Vajngerl <quikee gmail com>
Date: Tue Mar 23 02:18:26 2010 -0700
libxml-2.0: add support for TextWriter
Fixes bug 610573.
vapi/libxml-2.0.vapi | 104 +++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 103 insertions(+), 1 deletions(-)
---
diff --git a/vapi/libxml-2.0.vapi b/vapi/libxml-2.0.vapi
index fb3a48c..d9a7797 100644
--- a/vapi/libxml-2.0.vapi
+++ b/vapi/libxml-2.0.vapi
@@ -397,7 +397,7 @@ namespace Xml {
public Node* new_char_ref (string name);
[CCode (cname = "xmlNewDoc")]
- public Doc (string version);
+ public Doc (string? version = null);
[CCode (cname = "xmlNewDocComment")]
public Node* new_comment (string content);
@@ -903,6 +903,108 @@ namespace Xml {
public class SchemaValidCtxt {
}
+ /* xmlwriter - the XMLWriter implementation */
+
+ [Compact]
+ [CCode (cname = "xmlTextWriter", free_function = "xmlFreeTextWriter", cheader_filename = "libxml/xmlwriter.h")]
+ public class TextWriter {
+ [CCode (cname = "xmlNewTextWriterFilename")]
+ public TextWriter.filename (string uri, bool compression = false);
+
+ [CCode (cname = "xmlTextWriterFlush")]
+ public int flush ();
+
+ [CCode (cname = "xmlTextWriterSetIndent")]
+ public int set_indent (bool indent);
+
+ [CCode (cname = "xmlTextWriterSetIndentString")]
+ public int set_indent_string (string str);
+
+ /* End */
+ [CCode (cname = "xmlTextWriterEndCDATA")]
+ public int end_cdata ();
+
+ [CCode (cname = "xmlTextWriterEndComment")]
+ public int end_comment ();
+
+ [CCode (cname = "xmlTextWriterEndDocument")]
+ public int end_document ();
+
+ [CCode (cname = "xmlTextWriterEndElement")]
+ public int end_element ();
+
+ [CCode (cname = "xmlTextWriterEndAttribute")]
+ public int end_attribute ();
+
+ /* Start */
+
+ [CCode (cname = "xmlTextWriterStartCDATA")]
+ public int start_cdata ();
+
+ [CCode (cname = "xmlTextWriterStartComment")]
+ public int start_comment ();
+
+ [CCode (cname = "xmlTextWriterStartDocument")]
+ public int start_document (string? version = null, string? encoding = null, string? standalone = null);
+
+ [CCode (cname = "xmlTextWriterStartElement")]
+ public int start_element (string name);
+
+ [CCode (cname = "xmlTextWriterStartElementNS")]
+ public int start_element_ns (string prefix, string name, string namespaceURI);
+
+ [CCode (cname = "xmlTextWriterStartAttribute")]
+ public int start_attribute (string name);
+
+ [CCode (cname = "xmlTextWriterStartAttributeNS")]
+ public int start_attribute_ns (string prefix, string name, string namespaceURI);
+
+ /* write */
+
+ [CCode (cname = "xmlTextWriterWriteAttribute")]
+ public int write_attribute (string name, string content);
+
+ [CCode (cname = "xmlTextWriterWriteAttributeNS")]
+ public int write_attribute_ns (string prefix, string name, string namespaceURI, string content);
+
+ [CCode (cname = "xmlTextWriterWriteElement")]
+ public int write_element (string name, string content);
+
+ [CCode (cname = "xmlTextWriterWriteElementNS")]
+ public int write_element_ns (string prefix, string name, string namespaceURI, string content);
+
+ [CCode (cname = "xmlTextWriterWriteBase64")]
+ public int write_base64 (void* data, int start, int length);
+
+ [CCode (cname = "xmlTextWriterWriteComment")]
+ public int write_comment (string content);
+
+ [CCode (cname = "xmlTextWriterWriteString")]
+ public int write_string (string content);
+
+ /* formatted */
+
+ [CCode (cname = "xmlTextWriterWriteFormatAttribute")]
+ public int format_attribute (string name, string format, ...);
+
+ [CCode (cname = "xmlTextWriterWriteFormatAttributeNS")]
+ public int format_attribute_ns (string prefix, string name, string namespaceURI, string format, ...);
+
+ [CCode (cname = "xmlTextWriterWriteFormatCDATA")]
+ public int format_cdata (string format, ...);
+
+ [CCode (cname = "xmlTextWriterWriteFormatComment")]
+ public int format_comment (string format, ...);
+
+ [CCode (cname = "xmlTextWriterWriteFormatElement")]
+ public int format_element (string name, string format, ...);
+
+ [CCode (cname = "xmlTextWriterWriteFormatElementNS")]
+ public int format_element_ns (string prefix, string name, string namespaceURI, string format, ...);
+
+ [CCode (cname = "xmlTextWriterWriteFormatString")]
+ public int format_string (string format, ...);
+ }
/* xmlreader - the XMLReader implementation */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]