summaryrefslogtreecommitdiff
path: root/src/utils/xmlutils.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-05-12 01:02:51 +0300
committerAndrei Karas <akaras@inbox.ru>2016-05-12 01:02:51 +0300
commit07c62ac076c698cb7d6a4f8ceed616d982421f14 (patch)
treefe5b5b2115f1287608dd6c6a0850d36fd7760c12 /src/utils/xmlutils.cpp
parentd5a00a320043f5782ebc489285c89943b667e094 (diff)
downloadmv-07c62ac076c698cb7d6a4f8ceed616d982421f14.tar.gz
mv-07c62ac076c698cb7d6a4f8ceed616d982421f14.tar.bz2
mv-07c62ac076c698cb7d6a4f8ceed616d982421f14.tar.xz
mv-07c62ac076c698cb7d6a4f8ceed616d982421f14.zip
Add skipError parameter into xmlutils.
Diffstat (limited to 'src/utils/xmlutils.cpp')
-rw-r--r--src/utils/xmlutils.cpp30
1 files changed, 21 insertions, 9 deletions
diff --git a/src/utils/xmlutils.cpp b/src/utils/xmlutils.cpp
index 001e46919..fdcc272ec 100644
--- a/src/utils/xmlutils.cpp
+++ b/src/utils/xmlutils.cpp
@@ -31,10 +31,11 @@ void readXmlIntVector(const std::string &fileName,
const std::string &sectionName,
const std::string &itemName,
const std::string &attributeName,
- std::vector<int> &arr)
+ std::vector<int> &arr,
+ const SkipError skipError)
{
arr.clear();
- XML::Document doc(fileName, UseResman_true, SkipError_false);
+ XML::Document doc(fileName, UseResman_true, skipError);
const XmlNodePtrConst rootNode = doc.rootNode();
if (!rootNode || !xmlNameEqual(rootNode, rootName.c_str()))
@@ -63,8 +64,13 @@ void readXmlIntVector(const std::string &fileName,
childNode, "name", "");
if (!name.empty())
{
- readXmlIntVector(name, rootName, sectionName, itemName,
- attributeName, arr);
+ readXmlIntVector(name,
+ rootName,
+ sectionName,
+ itemName,
+ attributeName,
+ arr,
+ skipError);
}
}
}
@@ -77,9 +83,10 @@ void readXmlStringMap(const std::string &fileName,
const std::string &itemName,
const std::string &attributeKeyName,
const std::string &attributeValueName,
- std::map<std::string, std::string> &arr)
+ std::map<std::string, std::string> &arr,
+ const SkipError skipError)
{
- XML::Document doc(fileName, UseResman_true, SkipError_false);
+ XML::Document doc(fileName, UseResman_true, skipError);
const XmlNodePtrConst rootNode = doc.rootNode();
if (!rootNode || !xmlNameEqual(rootNode, rootName.c_str()))
@@ -110,9 +117,14 @@ void readXmlStringMap(const std::string &fileName,
childNode, "name", "");
if (!name.empty())
{
- readXmlStringMap(name, rootName, sectionName, itemName,
- attributeKeyName, attributeValueName,
- arr);
+ readXmlStringMap(name,
+ rootName,
+ sectionName,
+ itemName,
+ attributeKeyName,
+ attributeValueName,
+ arr,
+ skipError);
}
}
}