more changes for service groups (replacement for zapping alternatives
[vuplus_dvbapp] / lib / python / Tools / XMLTools.py
index aaab467..72b9038 100644 (file)
@@ -15,3 +15,13 @@ def elementsWithTag(el, tag):
                        continue
                if tag(x.tagName):
                        yield x
+
+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('&', '&amp;').replace('<', '&lt;').replace('>', '&gt;').replace("'", '&apos;').replace('"', '&quot;')