From 9c9f1661c23c96e97079eefa81f667cde38208f1 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Fri, 4 Dec 2009 23:55:26 +0100 Subject: Fix reading of CDATA sections --- layman/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/layman/utils.py b/layman/utils.py index 178ad11..695b996 100644 --- a/layman/utils.py +++ b/layman/utils.py @@ -112,7 +112,9 @@ def node_to_dict(node): for child in node.childNodes: if child.nodeType == child.TEXT_NODE: text = text + child.data - if child.nodeType == child.ELEMENT_NODE: + elif child.nodeType == child.CDATA_SECTION_NODE: + text = text + child.data + elif child.nodeType == child.ELEMENT_NODE: index = 1 while ('<' + child.tagName + '>' + str(index)) in result.keys(): index += 1 -- cgit v1.2.3-1-g7c22