sync 098claws
[claws.git] / src / common / xml.c
index 306f10e9ba467847c2c25b49c475dee471d87c41..c3d5581a1411817b2e5c82461c394093b0172946 100644 (file)
@@ -58,7 +58,6 @@ static void xml_string_table_create(void)
 
 #endif /* SPARSE_MEMORY */
 
-static void xml_free_tag       (XMLTag         *tag);
 static gint xml_get_parenthesis        (XMLFile        *file,
                                 gchar          *buf,
                                 gint            len);
@@ -558,7 +557,7 @@ void xml_free_tree(GNode *node)
        g_node_destroy(node);
 }
 
-static void xml_free_tag(XMLTag *tag)
+void xml_free_tag(XMLTag *tag)
 {
        if (!tag) return;
 
@@ -596,3 +595,14 @@ static gint xml_get_parenthesis(XMLFile *file, gchar *buf, gint len)
 
        return 0;
 }
+
+void xml_tag_add_attr(XMLTag *tag, const gchar *name, gchar *value)
+{
+       XMLAttr *attr;
+
+       attr = g_new0(XMLAttr, 1);
+       attr->name = XML_STRING_ADD(name);
+       attr->value = value;
+
+       tag->attr = g_list_append(tag->attr, attr);
+}