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

Method hideElements

src/Common/Config/ConfigProcessor.cpp:942–958  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

940}
941
942XMLDocumentPtr ConfigProcessor::hideElements(XMLDocumentPtr xml_tree)
943{
944 /// Create a copy of XML Document because hiding elements from preprocessed_xml document
945 /// also influences on configuration which has a pointer to preprocessed_xml document.
946
947 XMLDocumentPtr xml_tree_copy = new Poco::XML::Document(name_pool);
948
949 for (Node * node = xml_tree->firstChild(); node; node = node->nextSibling())
950 {
951 NodePtr new_node = xml_tree_copy->importNode(node, true);
952 xml_tree_copy->appendChild(new_node);
953 }
954 Node * new_config_root = getRootNode(xml_tree_copy.get());
955 hideRecursive(new_config_root);
956
957 return xml_tree_copy;
958}
959
960void ConfigProcessor::savePreprocessedConfig(LoadedConfig & loaded_config, std::string preprocessed_dir
961#if USE_SSL

Callers

nothing calls this directly

Calls 6

importNodeMethod · 0.80
getRootNodeFunction · 0.70
firstChildMethod · 0.45
nextSiblingMethod · 0.45
appendChildMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected