web/ldt/ldt_utils/utils.py
changeset 137 d363fa6232b2
parent 116 811b34fd1bc0
--- a/web/ldt/ldt_utils/utils.py	Tue Dec 28 14:33:15 2010 +0100
+++ b/web/ldt/ldt_utils/utils.py	Mon Jan 24 10:27:42 2011 +0100
@@ -17,6 +17,9 @@
     'f':False
 }
 
+def reduce_text_node(element_node, xpath_str):
+    return reduce(lambda t, s: t+s, element_node.xpath(xpath_str, smart_strings=False), "")
+
 def boolean_convert(bool):
     if bool is None:
         return False