22 elem = hdl.FirstChildElement(
"protocol").FirstChildElement(node.c_str()).Element();
25 std::cout<<
"error: no '"<<node<<
"' node in the config file. Aborting."<<std::endl;
30 const char * cont = elem->GetText();
45 if (strcmp(hashRepresentation,
"SHA-256") == 0)
47 else if (strcmp(hashRepresentation,
"SHA-384") == 0)
49 else if (strcmp(hashRepresentation,
"SHA-512") == 0)
53 std::cout<<
"ERROR: in XmlCOnfig.string2hash,"
54 <<
"Incorrect hash type: "
55 <<hashRepresentation<<std::endl;
63 std::string fieldRepr(fieldRepresentation);
65 std::string fieldByteTree =
"";
67 while (fieldRepr[index] !=
':')
72 while (index < fieldRepr.size())
75 if (fieldRepr[index]!=
' ')
76 fieldByteTree.push_back(fieldRepr[index]);
87 std::cout<<
"ERROR: in xmlConfig.unmarshalPGroup"
88 <<
"pgroup type unkown: "
90 <<
"Aborting."<<std::endl;
98 TiXmlDocument
doc(path2file.c_str());
102 std::cout<<
"Error when loading file"<<std::endl;
103 std::cout<<
"error #"<<
doc.ErrorId()<<
" : "<<
doc.ErrorDesc()<<std::endl;
108 TiXmlHandle hdl(&
doc);