Mercurial > pidgin
diff src/xmlnode.c @ 10425:9903182f2aac
[gaim-migrate @ 11677]
Added a util function to read an xml file and parse it into an xmlnode tree
Changed accounts.xml reading to use xmlnode's
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 26 Dec 2004 22:52:52 +0000 |
parents | 108151be77a3 |
children | 703f722d076f |
line wrap: on
line diff
--- a/src/xmlnode.c Sun Dec 26 18:58:36 2004 +0000 +++ b/src/xmlnode.c Sun Dec 26 22:52:52 2004 +0000 @@ -148,7 +148,7 @@ xmlnode_insert_child(node, attrib_node); } -const char* +const char * xmlnode_get_attrib(xmlnode *node, const char *attr) { xmlnode *x; @@ -231,7 +231,6 @@ g_return_val_if_fail(node != NULL, NULL); - for(c = node->child; c; c = c->next) { if(c->type == XMLNODE_TYPE_DATA) { if(!str) @@ -246,7 +245,7 @@ return g_string_free(str, FALSE); } -static gchar * +static char * xmlnode_to_str_helper(xmlnode *node, int *len, gboolean formatting, int depth) { GString *text = g_string_new(""); @@ -317,16 +316,16 @@ return g_string_free(text, FALSE); } -gchar * +char * xmlnode_to_str(xmlnode *node, int *len) { return xmlnode_to_str_helper(node, len, FALSE, 0); } -gchar * +char * xmlnode_to_formatted_str(xmlnode *node, int *len) { - gchar *xml, *xml_with_declaration; + char *xml, *xml_with_declaration; xml = xmlnode_to_str_helper(node, len, TRUE, 0); xml_with_declaration =