TiXmlElement *AgeElement = NameElement->NextSiblingElement();
TiXmlAttribute *IDAttribute = FirstPerson->FirstAttribute();
//输出第一个Person的name内容,即周星星;age内容,即;ID属性,即。
cout << NameElement->FirstChild()->Value() << endl;
cout << AgeElement->FirstChild()->Value() << endl;
cout << IDAttribute->Value()<< endl;
}
catch (string& e)
{
return false;
}
return true;
}
int main()
{
string fileName = "info.xml";
CreateXmlFile(fileName);
ReadXmlFile(fileName);
}
本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/tongxinshuyu/article-47700-3.html
好呀
中美双方在具有中国主权的南海上“合资”经营地区和平稳定