3,055
社区成员
发帖
与我相关
我的任务
分享
int main()
{
auto_ptr<TiXmlDocument> pDocument(new TiXmlDocument());
pDocument->LoadFile(lpszFileName);
TiXmlNode *pRoot = pDocument->FirstChild("fields");
if (!pRoot) {
return FALSE;
}
if (pRoot)
{
TiXmlNode *pNode = pRoot->FirstChildElement("pos_x");
if (pNode)
{
TiXmlNode *pValue = pNode->FirstChild();
if (pValue)
{
pValue->SetValue(szNodeValue);
}
}
}
pDocument->SaveFile();
}