diff --git a/src/tools/xml_tools.py b/src/tools/xml_tools.py index 30527a2e..abe9834d 100644 --- a/src/tools/xml_tools.py +++ b/src/tools/xml_tools.py @@ -412,6 +412,7 @@ class Element(object): @parent: parent element """ assert self.type is not None + self.children = [] if not hasattr(self, 'elem'): self.elem = parent.xmlui.doc.createElement(self.type) self.xmlui = xmlui @@ -427,6 +428,7 @@ class Element(object): """ self.elem.appendChild(child.elem) child.parent = self + self.children.append(child) return child