From 74fbe9646debef3bedc21e2895abe2eb7546742d Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Mon, 11 Aug 2003 12:45:15 +0000 Subject: [PATCH] When processing produces a list, give each item its own element. git-svn-id: http://dom-editor.googlecode.com/svn/branches/Gtk2@500 ef21e15d-ca94-4315-9c45-0d95b1b2e117 --- Dome/View.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dome/View.py b/Dome/View.py index 684c438..e29d7b2 100644 --- a/Dome/View.py +++ b/Dome/View.py @@ -828,9 +828,11 @@ class View: "Convert a python data structure into a tree and return the root." if type(data) == list: nlist = self.model.doc.createElementNS(DOME_NS, 'dome:list') - nlist.setAttributeNS(XMLNS_NAMESPACE, 'xmlns:dome', DOME_NS) + #nlist.setAttributeNS(XMLNS_NAMESPACE, 'xmlns:dome', DOME_NS) for x in data: - nlist.appendChild(self.python_to_node(x)) + li = self.model.doc.createElementNS(DOME_NS, 'dome:li') + nlist.appendChild(li) + li.appendChild(self.python_to_node(x)) return nlist return self.model.doc.createTextNode(str(data)) -- 2.11.4.GIT