diff options
| author | Oskari Timperi <oskari.timperi@iki.fi> | 2011-06-01 11:04:57 +0300 |
|---|---|---|
| committer | Oskari Timperi <oskari.timperi@iki.fi> | 2011-06-01 11:04:57 +0300 |
| commit | 8eba476357c8488be510f012594f305848a7eeb6 (patch) | |
| tree | 42677f805d20d4b5d0b217aaacf1acedca29d2bd /example.cpp | |
| parent | a71564984253ade92fc4d3c9bf185807efc570bf (diff) | |
| download | sxml-8eba476357c8488be510f012594f305848a7eeb6.tar.gz sxml-8eba476357c8488be510f012594f305848a7eeb6.zip | |
Move add_element() to node and add add_comment()
Diffstat (limited to 'example.cpp')
| -rw-r--r-- | example.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/example.cpp b/example.cpp index bbc3bbd..166ae98 100644 --- a/example.cpp +++ b/example.cpp @@ -35,13 +35,13 @@ int main() root->add_element("node")->set_attr("id", 0); - root->add_child(new comment("yay, a comment!")); + root->add_comment("yay, a comment"); root->add_element("node")->set_attr("id", 1); element *node = root->add_element("node")->set_attr("id", 3.1); - node = node->add_element("subnode") - node->add_element("subsubnode")->add_child( - new comment("i am in pretty deep waters here, man ..")); + node = node->add_element("subnode"); + node->add_element("subsubnode")->add_comment( + "i am in pretty deep waters here, man .."); std::cout << root->to_string(true) << std::endl; |
