From b0e551b36a6ff121b3cf5ffeb5bda0e5a1f229a9 Mon Sep 17 00:00:00 2001 From: Dave Goodwin Date: Wed, 20 Aug 2003 15:13:45 +0000 Subject: [PATCH] removed self.root, which was self-referencing. 'build' replaced by 'get_XML_File' in constructor. --- Cantera/python/Cantera/XML.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/Cantera/python/Cantera/XML.py b/Cantera/python/Cantera/XML.py index c55fe8928..ac3566165 100644 --- a/Cantera/python/Cantera/XML.py +++ b/Cantera/python/Cantera/XML.py @@ -21,13 +21,15 @@ class XML_Node: self.wrap = wrap if wrap > 0: self._xml_id = wrap - self._root = root + self._root = 0 # root + elif src: + self._xml_id = _cantera.xml_get_XML_File(src) + self._root = 0 + self.wrap = 1 else: self._xml_id = _cantera.xml_new(name) - if src: - _cantera.xml_build(self._xml_id, src, preprocess) - self._root = self - + self._root = 0 + def __del__(self): """Delete the node. Does nothing if this node is only a wrapper.""" if not self.wrap: @@ -136,6 +138,10 @@ class XML_Node: id = self["idRef"]) +def clear_XML(): + _cantera.xml_clear() + + def find_XML(src = "", root = None, id = "", loc = "", name=""): doc = None r = None