Commit 9b5d0190 authored by Nicolas Delaby's avatar Nicolas Delaby

improve text gathering

parent 30f4a2fb
......@@ -348,13 +348,7 @@ class ERP5Diff:
"""
Aggregate child text nodes of an element into a single string.
"""
text = ''
if not self._hasChildren(element):
return element.text
for child in element:
if type(child) == etree._Element:
text += child.text
return text
return '%s' % element.xpath('string(text())')
def _removeStrictEqualsSubNodeList(self, old_list, new_list):
"""Remove inside list all elements which are similar
......
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