diff options
author | arseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640> | 2010-07-11 13:29:12 +0000 |
---|---|---|
committer | arseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640> | 2010-07-11 13:29:12 +0000 |
commit | fb507ab2d6f9eaa090671e40b582354b16f3821c (patch) | |
tree | 4cf47721ff98432595ea8704e2e8d421d1f3c913 /docs/samples/modify_add.cpp | |
parent | f73df8d06e67f4a1d00b427d752fb0deab11e553 (diff) |
docs: Replaced all tabs with 4 spaces (guaranteed tab size)
git-svn-id: http://pugixml.googlecode.com/svn/trunk@591 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'docs/samples/modify_add.cpp')
-rw-r--r-- | docs/samples/modify_add.cpp | 44 |
1 files changed, 23 insertions, 21 deletions
diff --git a/docs/samples/modify_add.cpp b/docs/samples/modify_add.cpp index 88c8fe6..76619b3 100644 --- a/docs/samples/modify_add.cpp +++ b/docs/samples/modify_add.cpp @@ -4,27 +4,29 @@ int main()
{
- pugi::xml_document doc;
+ pugi::xml_document doc;
//[code_modify_add
- // add node with some name
- pugi::xml_node node = doc.append_child();
- node.set_name("node");
-
- // add description node with text child
- pugi::xml_node descr = node.append_child();
- descr.set_name("description");
- descr.append_child(pugi::node_pcdata).set_value("Simple node");
-
- // add param node before the description
- pugi::xml_node param = node.insert_child_before(pugi::node_element, descr);
- param.set_name("param");
-
- // add attributes to param node
- param.append_attribute("name") = "version";
- param.append_attribute("value") = 1.1;
- param.insert_attribute_after("type", param.attribute("name")) = "float";
- //]
-
- doc.print(std::cout);
+ // add node with some name
+ pugi::xml_node node = doc.append_child();
+ node.set_name("node");
+
+ // add description node with text child
+ pugi::xml_node descr = node.append_child();
+ descr.set_name("description");
+ descr.append_child(pugi::node_pcdata).set_value("Simple node");
+
+ // add param node before the description
+ pugi::xml_node param = node.insert_child_before(pugi::node_element, descr);
+ param.set_name("param");
+
+ // add attributes to param node
+ param.append_attribute("name") = "version";
+ param.append_attribute("value") = 1.1;
+ param.insert_attribute_after("type", param.attribute("name")) = "float";
+ //]
+
+ doc.print(std::cout);
}
+
+// vim:et
|