Add ns_prefix parameter to add_child().
authorCarl Hetherington <cth@carlh.net>
Wed, 21 Feb 2024 23:23:47 +0000 (00:23 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 21 Feb 2024 23:23:47 +0000 (00:23 +0100)
src/cxml.cc
src/cxml.h

index 814a558815cab8880064dc03fa9d3000204d5e3f..75da11f76749574287e584e27c7330b918950d98 100644 (file)
@@ -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);
 }
 
 
index 417662294497594b220d4776a05bcfec116f1a7e..e6130399bef0d84eab6625e6af9308273cd4e6df 100644 (file)
@@ -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);