| 294 | |
| 295 | |
| 296 | void XMLConfiguration::removeRaw(const std::string& key) |
| 297 | { |
| 298 | Poco::XML::Node* pNode = findNode(key); |
| 299 | |
| 300 | if (pNode) |
| 301 | { |
| 302 | if (pNode->nodeType() == Poco::XML::Node::ELEMENT_NODE) |
| 303 | { |
| 304 | Poco::XML::Node* pParent = pNode->parentNode(); |
| 305 | if (pParent) |
| 306 | { |
| 307 | pParent->removeChild(pNode); |
| 308 | } |
| 309 | } |
| 310 | else if (pNode->nodeType() == Poco::XML::Node::ATTRIBUTE_NODE) |
| 311 | { |
| 312 | Poco::XML::Attr* pAttr = dynamic_cast<Poco::XML::Attr*>(pNode); |
| 313 | Poco::XML::Element* pOwner = pAttr->ownerElement(); |
| 314 | if (pOwner) |
| 315 | { |
| 316 | pOwner->removeAttributeNode(pAttr); |
| 317 | } |
| 318 | } |
| 319 | } |
| 320 | } |
| 321 | |
| 322 | |
| 323 | const Poco::XML::Node* XMLConfiguration::findNode(const std::string& key) const |
nothing calls this directly
no test coverage detected