[xml] Small fix for xmlStringGetNodeList()
- From: Anthony Jones <amj30 hermes cam ac uk>
- To: <xml gnome org>
- Subject: [xml] Small fix for xmlStringGetNodeList()
- Date: Sun, 6 Jan 2002 22:02:51 +0000 (GMT)
Hi,
This should fix a small problem in xmlStringGetNodeList(). The patch is
against libxml-2.4.11 (The problem appears to exist in CVS as well, but I
don't have a proper 'net connection at the moment, so all I've got to go
on is the CVS source browser at cvs.gnome.org). I think the patch is
fairly self explanatory...
Anthony
--- libxml2/tree.c.orig Sun Jan 6 21:33:02 2002
+++ libxml2/tree.c Sun Jan 6 21:34:56 2002
@@ -751,6 +751,9 @@
if (last == NULL) {
node = xmlNewDocText(doc, ent->content);
last = ret = node;
+ } else if (last->type != XML_TEXT_NODE) {
+ node = xmlNewDocText(doc, ent->content);
+ last = xmlAddNextSibling(last, node);
} else
xmlNodeAddContent(last, ent->content);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]