diff options
author | Sebastian Pipping <sebastian@pipping.org> | 2009-12-04 23:55:26 +0100 |
---|---|---|
committer | Sebastian Pipping <sebastian@pipping.org> | 2009-12-05 00:17:20 +0100 |
commit | 9c9f1661c23c96e97079eefa81f667cde38208f1 (patch) | |
tree | 93182164bf6a48c102bb46bab5b147cf1698aaad | |
parent | a04926356ba19a23afc4f166f20e7edccfa350f7 (diff) | |
download | layman-9c9f1661c23c96e97079eefa81f667cde38208f1.tar.gz layman-9c9f1661c23c96e97079eefa81f667cde38208f1.tar.bz2 layman-9c9f1661c23c96e97079eefa81f667cde38208f1.zip |
Fix reading of CDATA sections
-rw-r--r-- | layman/utils.py | 4 |
1 files changed, 3 insertions, 1 deletions
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 |