Patch simplexml.c.patch for SimpleXML related Bug #54354
Patch version 2011-04-26 23:07 UTC
Return to Bug #54354 |
Download this patch
Patch Revisions:
Developer: tom@samplonius.org
--- simplexml.c.orig 2011-04-26 16:00:31.000000000 -0700
+++ simplexml.c 2011-04-26 16:00:41.000000000 -0700
@@ -1619,12 +1619,14 @@
localname = xmlStrdup((xmlChar *)qname);
}
+ /* Add new child with no namespace */
newnode = xmlNewChild(node, NULL, localname, (xmlChar *)value);
if (nsuri != NULL) {
+ /* If namespace is not NULL but blank, use no namespace
+ Use this to prevent inheriting the name space of the parent */
if (nsuri_len == 0) {
newnode->ns = NULL;
- nsptr = xmlNewNs(newnode, (xmlChar *)nsuri, prefix);
} else {
nsptr = xmlSearchNsByHref(node->doc, node, (xmlChar *)nsuri);
if (nsptr == NULL) {
|