--- a/xmlclass/xmlclass.py Mon Dec 12 00:25:18 2011 +0100
+++ b/xmlclass/xmlclass.py Mon Dec 12 00:38:24 2011 +0100
@@ -131,8 +131,8 @@
# content is a CDATA
text = ""
for node in attr.childNodes:
- if node.nodeName != "#text":
- text += node.data.encode("utf-8")
+ if not (node.nodeName == "#text" and node.data.strip() == ""):
+ text += unescape(node.data.encode("utf-8"))
return text
@@ -535,7 +535,7 @@
def GenerateAnyInfos(infos):
def ExtractAny(tree):
if tree.nodeName in ["#text", "#cdata-section"]:
- return tree.data.encode("utf-8")
+ return unescape(tree.data.encode("utf-8"))
else:
return tree