comparison libgaim/xmlnode.c @ 14322:950f3ed6baa0

[gaim-migrate @ 17017] fix xmlnode_from_str for libxml2 committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Thu, 24 Aug 2006 17:33:24 +0000
parents c18bdf510325
children 2d7086454b08
comparison
equal deleted inserted replaced
14321:611ca4e7b429 14322:950f3ed6baa0
568 568
569 real_size = size < 0 ? strlen(str) : size; 569 real_size = size < 0 ? strlen(str) : size;
570 xpd = g_new0(struct _xmlnode_parser_data, 1); 570 xpd = g_new0(struct _xmlnode_parser_data, 1);
571 571
572 #ifdef HAVE_LIBXML 572 #ifdef HAVE_LIBXML
573 if (xmlSAXUserParseMemory(&xmlnode_parser_libxml, xpd, str, size) < 0) { 573 if (xmlSAXUserParseMemory(&xmlnode_parser_libxml, xpd, str, real_size) < 0) {
574 while(xpd->current && xpd->current->parent) 574 while(xpd->current && xpd->current->parent)
575 xpd->current = xpd->current->parent; 575 xpd->current = xpd->current->parent;
576 if(xpd->current) 576 if(xpd->current)
577 xmlnode_free(xpd->current); 577 xmlnode_free(xpd->current);
578 xpd->current = NULL; 578 xpd->current = NULL;