[Pidgin] #7814: xmlnode_from_str reads in extraneous detail from formatted XML files, makes xmlnode_to_formatted_str unhappy
Pidgin
trac at pidgin.im
Wed Dec 17 14:06:12 EST 2008
#7814: xmlnode_from_str reads in extraneous detail from formatted XML files, makes
xmlnode_to_formatted_str unhappy
--------------------------------------+-------------------------------------
Reporter: darkrain42 | Owner:
Type: defect | Status: new
Milestone: | Component: libpurple
Version: 2.5.2 | Resolution:
Keywords: xmlnode, xml, formatting |
--------------------------------------+-------------------------------------
Comment(by deryni):
Contents of http://pastebin.be/15493
{{{
xmlnode *xml_launch = purple_util_read_xml_from_file("gfire_launch.xml",
"gfire_launch.xml");
if(xml_launch == NULL) {
xml_launch = xmlnode_new("launchinfo");
}
xmlnode *game_node = xmlnode_new("game");
xmlnode_set_attrib(game_node, "id", game_id);
xmlnode_set_attrib(game_node, "name", game_name);
xmlnode *xqf_node = xmlnode_new_child(game_node, "xqf");
xmlnode_set_attrib(xqf_node, "name", "");
xmlnode *command_node = xmlnode_new_child(game_node, "command");
xmlnode *bin_node = xmlnode_new_child(command_node, "bin");
xmlnode_insert_data(bin_node, bin, -1);
xmlnode *dir_node = xmlnode_new_child(command_node, "dir");
xmlnode_insert_data(dir_node, path_root, -1);
xmlnode *gamemod_node = xmlnode_new_child(command_node, "gamemod");
xmlnode_insert_data(gamemod_node, "", -1);
xmlnode *connect_node = xmlnode_new_child(command_node, "connect");
xmlnode_insert_data(connect_node, game_connect, -1);
xmlnode *launch_node = xmlnode_new_child(command_node, "launch");
xmlnode_insert_data(launch_node, "@options@ @gamemod@ @connect@", -1);
xmlnode_insert_child(xml_launch, game_node);
char *xml_launch_str = xmlnode_to_formatted_str(xml_launch, NULL);
purple_util_write_data_to_file("gfire_launch.xml", xml_launch_str, -1);
printf("%s", xml_launch_str);
}}}
--
Ticket URL: <http://developer.pidgin.im/ticket/7814#comment:2>
Pidgin <http://pidgin.im>
Pidgin
More information about the Tracker
mailing list