applied patch from Christian Glahn to allow xmlNewChild() on document
* tree.c: applied patch from Christian Glahn to allow
xmlNewChild() on document fragment nodes
Daniel
diff --git a/tree.c b/tree.c
index 1b18ee9..cf4a6b0 100644
--- a/tree.c
+++ b/tree.c
@@ -2091,6 +2091,8 @@
cur = xmlNewDocNode((xmlDocPtr) parent, NULL, name, content);
else
cur = xmlNewDocNode((xmlDocPtr) parent, ns, name, content);
+ } else if (parent->type == XML_DOCUMENT_FRAG_NODE) {
+ cur = xmlNewDocNode( parent->doc, ns, name, content);
} else {
return(NULL);
}