| 940 | } |
| 941 | |
| 942 | XMLDocumentPtr 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 | |
| 960 | void ConfigProcessor::savePreprocessedConfig(LoadedConfig & loaded_config, std::string preprocessed_dir |
| 961 | #if USE_SSL |
nothing calls this directly
no test coverage detected