| 92 | |
| 93 | |
| 94 | void MdString::FromXml(const IXmlNode& node) { |
| 95 | const auto attr_list = node.GetAttributeList(); |
| 96 | for (const auto& [key, value] : attr_list) { |
| 97 | if (key == "ci" && !value.empty()) { |
| 98 | try { |
| 99 | ci_ = std::stoll(value); |
| 100 | } catch (const std::exception&) { |
| 101 | ci_ = 0; |
| 102 | } |
| 103 | } else if (key == "xml:lang") { |
| 104 | lang_ = value; |
| 105 | } else if (key == "offset") { |
| 106 | try { |
| 107 | offset_ = stoull(value); |
| 108 | } catch (const std::exception& ) { |
| 109 | offset_.reset(); |
| 110 | } |
| 111 | } else { |
| 112 | AddCustomAttribute(key, value); |
| 113 | } |
| 114 | } |
| 115 | text_ = node.Value<std::string>(); |
| 116 | } |
| 117 | } // namespace mdf |
nothing calls this directly
no test coverage detected