use xmlpp::Document instead of xmlpp::DomParser (the parser is not needed because we do not parse)
--- a/src/XPathHandler.h Wed Dec 30 10:03:21 2020 +0100
+++ b/src/XPathHandler.h Wed Dec 30 10:33:24 2020 +0100
@@ -53,7 +53,7 @@
xmlpp::Node::PrefixNsMap xmlns;
- xmlpp::DomParser dom;
+ xmlpp::Document dom;
xmlpp::Element* recordElement = nullptr;
relpipe::in::xmltable::XMLNameCodec xmlNameCodec; // TODO: move to a common library
@@ -71,8 +71,8 @@
}
void resetRecordElement() {
- if (recordElement) dom.get_document()->get_root_node()->remove_child(recordElement);
- recordElement = dom.get_document()->get_root_node()->add_child("record");
+ if (recordElement) dom.get_root_node()->remove_child(recordElement);
+ recordElement = dom.get_root_node()->add_child("record");
}
const Glib::ustring s2x(relpipe::common::type::StringX value) {
@@ -134,8 +134,8 @@
for (auto oa : currentRelationConfiguration->outputAttributes) currentWriterMetadata.push_back({oa.name, oa.type});
if (isAppendingInputAttributes()) copyInputAttributesToOutput();
- dom.get_document()->create_root_node("relpipe-tr-xpath");
- dom.get_document()->get_root_node()->add_child("relation-name")->add_child_text(s2x(name));
+ dom.create_root_node("relpipe-tr-xpath");
+ dom.get_root_node()->add_child("relation-name")->add_child_text(s2x(name));
resetRecordElement();
}