Commit e22dd5ce authored by Daniel Veillard's avatar Daniel Veillard
Browse files

applied a couple of patches from Mark Lilback about text nodes coalescing

* tree.c: applied a couple of patches from Mark Lilback about text
  nodes coalescing
Daniel
parent e991fe95
Wed Oct 29 13:52:25 CET 2003 Daniel Veillard <daniel@veillard.com>
* tree.c: applied a couple of patches from Mark Lilback about text
nodes coalescing
Wed Oct 29 12:16:52 CET 2003 Daniel Veillard <daniel@veillard.com>
 
* xpath.c: change suggested by Anthony Carrico when unregistering
......
......@@ -2989,7 +2989,8 @@ xmlAddSibling(xmlNodePtr cur, xmlNodePtr elem) {
xmlUnlinkNode(elem);
if ((cur->type == XML_TEXT_NODE) && (elem->type == XML_TEXT_NODE)) {
if ((cur->type == XML_TEXT_NODE) && (elem->type == XML_TEXT_NODE) &&
(cur->name == elem->name)) {
xmlNodeAddContent(cur, elem->content);
xmlFreeNode(elem);
return(cur);
......@@ -3129,6 +3130,7 @@ xmlAddChild(xmlNodePtr parent, xmlNodePtr cur) {
if (cur->type == XML_TEXT_NODE) {
if ((parent->type == XML_TEXT_NODE) &&
(parent->content != NULL) &&
(parent->name == cur->name) &&
(parent != cur)) {
xmlNodeAddContent(parent, cur->content);
xmlFreeNode(cur);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment