void GZLTBydDataExt::readFromXml(QDomElement & secondElem)
{
//QDomElement elem = secondElem.firstChildElement();
//while(!elem.isNull())
//{
// this->readMathData(elem);
// elem = elem.nextSiblingElement();
// }
QStack<QDomElement> elemStack;
QDomElement firstChild = secondElem.firstChildElement();
if(firstChild.isNull())return;
elemStack.push(firstChild);
while(!elemStack.isEmpty())
{
//先将要处理的节点弹出
QDomElement elem = elemStack.pop();
//do something....
QString path;
this->getPath(elem, path);
this->readMathData(elem, path);
//.............
QDomElement subElem = elem.nextSiblingElement();
if (!subElem.isNull())
{
elemStack.push(subElem);
}
QDomElement child = elem.firstChildElement();
if(!child.isNull())
{
elemStack.push(child);
}
}
}