| 99 | } |
| 100 | |
| 101 | std::string readValue(DOMNode* node) |
| 102 | { |
| 103 | if (node->getNodeType() == DOMNode::ELEMENT_NODE) { |
| 104 | if (DOMElement* child = |
| 105 | static_cast<DOMElement*>(node)->getFirstElementChild()) { // NOLINT |
| 106 | if (DOMNode* nameAttr = |
| 107 | child->getAttributes()->getNamedItem(XStrLiteral("value").unicodeForm())) { |
| 108 | std::string value = StrX(nameAttr->getNodeValue()).c_str(); |
| 109 | return value; |
| 110 | } |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | return {}; |
| 115 | } |
| 116 | |
| 117 | class DocumentMetadata |
| 118 | { |
no test coverage detected