From 0524cc9f71e135b263c625e8058f5a7672eac173 Mon Sep 17 00:00:00 2001 From: Harry Moffat Date: Wed, 13 Aug 2003 15:24:24 +0000 Subject: [PATCH] Fixed an error with build(). Basically it was having trouble with the tag "--". I think that tag is illegal anyway. --- Cantera/src/xml.cpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/Cantera/src/xml.cpp b/Cantera/src/xml.cpp index b09f8f452..0d6815183 100755 --- a/Cantera/src/xml.cpp +++ b/Cantera/src/xml.cpp @@ -435,7 +435,21 @@ namespace Cantera { while (!f.eof()) { attribs.clear(); nm = r.readTag(attribs); +#ifdef DEBUG_HKM + //if (nm == "EOF") { + // cout << "*** at XMLNode "; + // if (!node) cout << "NULL"; + // cout << " : read " << nm << endl; + //} else { + // cout << "*** at XMLNode " << node->name() + // << " : read " << nm << endl; + //} +#endif if (nm == "EOF") break; + if (nm == "--" && m_name == "--" && m_root == this) { + //cout << "*********special top condition " << endl; + continue; + } int lnum = r.m_line; if (nm[nm.size() - 1] == '/') { nm2 = nm.substr(0,nm.size()-1); @@ -520,6 +534,19 @@ namespace Cantera { node_dest->addAttribute(b->first, b->second); } vector &vsc = node_dest->children(); +#ifdef DEBUG_HKM + //cout << "*** dest: " << node_dest->name() + // << ", value = \"" << node_dest->value(); + //cout << "\" *** src: " << m_name + // << ", value = \"" << m_value << "\"" << endl; + //cout << " ***** src: " << m_name + // << " has " << m_nchildren <<" children:"; + //for (int n = 0; n < m_nchildren; n++) { + // sc = m_children[n]; + // cout << " " << sc->name(); + //} + //cout << endl; +#endif for (int n = 0; n < m_nchildren; n++) { sc = m_children[n]; ndc = node_dest->nChildren();