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 filterXMLString(text):
+ # TODO: better solutions?
+ return text.replace('"', """).replace('<', '<')