diff src/xmlnode.h @ 10423:3232e1a33899

[gaim-migrate @ 11675] Set version numbers for all our xml files Use xmlnode for writing accounts.xml Add 2 conveniencey helper functions to xmlnode committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sun, 26 Dec 2004 18:38:22 +0000
parents 5b7a74d397cc
children 108151be77a3
line wrap: on
line diff
--- a/src/xmlnode.h	Sun Dec 26 05:56:18 2004 +0000
+++ b/src/xmlnode.h	Sun Dec 26 18:38:22 2004 +0000
@@ -59,6 +59,19 @@
 xmlnode *xmlnode_new(const char *name);
 
 /**
+ * Creates a new xmlnode and inserts data into it.
+ *
+ * @param name The name of the node.
+ * @param data The data to insert.
+ * @param size The size of the data to insert.  If data is
+ *             null-terminated you can pass in -1.
+ *
+ * @return The new node.
+ */
+xmlnode *xmlnode_new_with_data(const char *name,
+							   const char *data, size_t size);
+
+/**
  * Creates a new xmlnode child.
  *
  * @param parent The parent node.
@@ -69,6 +82,20 @@
 xmlnode *xmlnode_new_child(xmlnode *parent, const char *name);
 
 /**
+ * Creates a new xmlnode child and inserts data into it.
+ *
+ * @param parent The parent node.
+ * @param name   The name of the child node.
+ * @param data   The data to insert.
+ * @param size   The size of the data to insert.  If data is
+ *               null-terminated you can pass in -1.
+ *
+ * @return The new child node.
+ */
+xmlnode *xmlnode_new_child_with_data(xmlnode *parent, const char *name,
+									 const char *data, size_t size);
+
+/**
  * Inserts a node into a node as a child.
  *
  * @param parent The parent node to insert child into.