+uint64_t XMLParseUtils::GetUInt64Attr(const pugi::xml_node &node, const char *str) {
+ auto attr = node.attribute(str);
+ if (attr.empty())
+ THROW_IE_EXCEPTION << "node <" << node.name() << "> is missing mandatory attribute: " << str << " at offset "
+ << node.offset_debug();
+ std::string str_value = std::string(attr.value());
+ std::size_t idx = 0;
+ long long int_value = std::stoll(str_value, &idx, 10);
+ if (idx != str_value.length() || int_value < 0)
+ THROW_IE_EXCEPTION << "node <" << node.name() << "> has attribute \"" << str << "\" = \"" << str_value
+ << "\" which is not an unsigned 64 bit integer" << " at offset "
+ << node.offset_debug();
+ return static_cast<uint64_t>(int_value);
+}