aboutsummaryrefslogtreecommitdiff
path: root/sxml.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sxml.cpp')
-rw-r--r--sxml.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/sxml.cpp b/sxml.cpp
index 957c8c3..0e23833 100644
--- a/sxml.cpp
+++ b/sxml.cpp
@@ -65,6 +65,16 @@ node *node::add_child(node *child)
return child;
}
+element *node::add_element(const std::string &tag)
+{
+ return new element(tag, this);
+}
+
+comment *node::add_comment(const std::string &text)
+{
+ return new comment(text, this);
+}
+
string node::to_string(bool nice , int indent) const
{
nice = nice;
@@ -220,11 +230,6 @@ string element::to_string(bool nice, int indent) const
return xml.str();
}
-element *element::add_element(const std::string &tag)
-{
- return new element(tag, this);
-}
-
template<> element *element::set_text<>(const string &text)
{
m_text = text;