From bc3a7cf853510ffe1e42dc683f854d360f6528c7 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 30 Nov 2015 13:59:45 +0300 Subject: Add pugixml backend incomplete. Add some defines for xml nodes manipulation. With pugixml backend no xml writing. --- src/configuration.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/configuration.cpp') diff --git a/src/configuration.cpp b/src/configuration.cpp index fcc6bfbdf..583ea2d83 100644 --- a/src/configuration.cpp +++ b/src/configuration.cpp @@ -706,7 +706,7 @@ void ConfigurationObject::initFromXML(const XmlNodePtrConst parentNode) for_each_xml_child_node(subnode, node) { if (xmlNameEqual(subnode, name.c_str()) && - subnode->type == XML_ELEMENT_NODE) + xmlTypeEqual(subnode, XML_ELEMENT_NODE)) { ConfigurationObject *const cobj = new ConfigurationObject; cobj->initFromXML(subnode); // recurse @@ -855,7 +855,7 @@ void Configuration::write() fclose(testFile); } - const XmlTextWriterPtr writer = xmlNewTextWriterFilename( + const XmlTextWriterPtr writer = XmlNewTextWriterFilename( mConfigPath.c_str(), 0); if (!writer) @@ -867,15 +867,15 @@ void Configuration::write() logger->log1("Configuration::write() writing configuration..."); - xmlTextWriterSetIndent(writer, 1); - xmlTextWriterStartDocument(writer, nullptr, nullptr, nullptr); + XmlTextWriterSetIndent(writer, 1); + XmlTextWriterStartDocument(writer, nullptr, nullptr, nullptr); // xmlTextWriterStartDocument(writer, nullptr, "utf8", nullptr); XmlTextWriterStartElement(writer, "configuration"); writeToXML(writer); - xmlTextWriterEndDocument(writer); - xmlFreeTextWriter(writer); + XmlTextWriterEndDocument(writer); + XmlFreeTextWriter(writer); BLOCK_END("Configuration::write") } -- cgit v1.2.3-70-g09d2