+
+def mergeText(nodelist):
+ rc = ""
+ for node in nodelist:
+ if node.nodeType == node.TEXT_NODE:
+ rc = rc + node.data
+ return rc
+
+def stringToXML(text):
+ return text.replace('&', '&').replace('<', '<').replace('>', '>').replace("'", ''').replace('"', '"')