MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / removeRaw

Method removeRaw

base/poco/Util/src/XMLConfiguration.cpp:296–320  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

294
295
296void 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
323const Poco::XML::Node* XMLConfiguration::findNode(const std::string& key) const

Callers

nothing calls this directly

Calls 5

ownerElementMethod · 0.80
removeAttributeNodeMethod · 0.80
nodeTypeMethod · 0.45
parentNodeMethod · 0.45
removeChildMethod · 0.45

Tested by

no test coverage detected