MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / FromXml

Method FromXml

lib/mdflib/mdflib/src/mdstandardattribute.cpp:88–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86}
87
88void MdStandardAttribute::FromXml(const IXmlNode& node) {
89 const auto attr_list = node.GetAttributeList();
90 for (const auto& [key, value] : attr_list) {
91 if (key == "ci" && !value.empty()) {
92 try {
93 ci_ = std::stoll(value);
94 } catch (const std::exception_ptr&) {
95 ci_ = 0;
96 }
97 } else if (key == "xml:lang") {
98 lang_ = value;
99 } else {
100 AddCustomAttribute(key, value);
101 }
102 }
103}
104
105} // namespace mdf

Callers

nothing calls this directly

Calls 2

GetAttributeListMethod · 0.80
emptyMethod · 0.80

Tested by

no test coverage detected