summaryrefslogtreecommitdiff
path: root/src/cxml.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-02-07 00:55:30 +0100
committerCarl Hetherington <cth@carlh.net>2024-02-07 00:55:30 +0100
commit42ae34df3c11483a798bfa01a31b9494fc8d8315 (patch)
treec58e58e8d6be2b97ed5ba8b27fb8002d0386b809 /src/cxml.cc
parent251957abb0a955f91d7aedaf46c02b2294593881 (diff)
Add cxml::add_child() and cxml::add_text_child().v0.17.7
Diffstat (limited to 'src/cxml.cc')
-rw-r--r--src/cxml.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/cxml.cc b/src/cxml.cc
index 7096f71..814a558 100644
--- a/src/cxml.cc
+++ b/src/cxml.cc
@@ -470,3 +470,17 @@ cxml::raw_convert (string v)
{
return locale_convert<double> (make_local(v));
}
+
+
+xmlpp::Element*
+cxml::add_child(xmlpp::Element* parent, string const& name)
+{
+ return parent->add_child(name);
+}
+
+
+void
+cxml::add_text_child(xmlpp::Element* parent, string const& name, string const& text)
+{
+ parent->add_child(name)->add_child_text(text);
+}