rel:第一个初步可用版本。
This commit is contained in:
@@ -8,6 +8,7 @@ bool CXmlOpr::open(const std::string &xml_path)
|
||||
if (doc_.LoadFile(xml_path.c_str()) != tinyxml2::XML_SUCCESS) {
|
||||
return false;
|
||||
}
|
||||
xml_path_ = xml_path;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -45,3 +46,12 @@ bool CXmlOpr::parse_xml(std::vector<tinyxml2::XMLElement*>& vec)
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CXmlOpr::save()
|
||||
{
|
||||
auto ret = doc_.SaveFile(xml_path_.c_str());
|
||||
if (ret != tinyxml2::XML_SUCCESS) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user