From 325832ff72c5b124cfb11223a387bc86e9ffa380 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Wed, 30 May 2007 14:39:06 +0000 Subject: [PATCH] create new nodes with attributes correctly --- src/tree.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/tree.c b/src/tree.c index ed51f0b..a9ccefe 100644 --- a/src/tree.c +++ b/src/tree.c @@ -57,8 +57,11 @@ xmlNodePtr tree_get_node(const gchar *path, const gchar *def) if (!c) { gint i; + gchar **attrs; - c = xmlNewTextChild(n, NULL, *it, *next ? NULL : def); + attrs = g_strsplit(*it, ":", 0); + + c = xmlNewTextChild(n, NULL, *it, *next ? NULL : attrs[0]); for (i = 1; attrs[i]; ++i) { gchar **eq = g_strsplit(attrs[i], "=", 2); -- 2.39.2