From a0ca8f600cd5bbf3b942b276fc870083de4e1b0a Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 22 Feb 2024 00:23:47 +0100 Subject: Add ns_prefix parameter to add_child(). --- src/cxml.cc | 4 ++-- src/cxml.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/cxml.cc b/src/cxml.cc index 814a558..75da11f 100644 --- a/src/cxml.cc +++ b/src/cxml.cc @@ -473,9 +473,9 @@ cxml::raw_convert (string v) xmlpp::Element* -cxml::add_child(xmlpp::Element* parent, string const& name) +cxml::add_child(xmlpp::Element* parent, string const& name, string const& ns_prefix) { - return parent->add_child(name); + return parent->add_child(name, ns_prefix); } diff --git a/src/cxml.h b/src/cxml.h index 4176622..e613039 100644 --- a/src/cxml.h +++ b/src/cxml.h @@ -271,7 +271,7 @@ private: }; -xmlpp::Element* add_child(xmlpp::Element* parent, std::string const& name); +xmlpp::Element* add_child(xmlpp::Element* parent, std::string const& name, std::string const& ns_prefix = {}); void add_text_child(xmlpp::Element* parent, std::string const& name, std::string const& text); -- cgit v1.2.3