summaryrefslogtreecommitdiff
path: root/docs/samples/modify_base.cpp
diff options
context:
space:
mode:
authorArseny Kapoulkine <arseny.kapoulkine@gmail.com>2015-04-10 22:26:57 -0700
committerArseny Kapoulkine <arseny.kapoulkine@gmail.com>2015-04-10 22:26:57 -0700
commite90d2ac8ba44fbcf4d5702643f708f2c86bde42e (patch)
treea52fe8e4efee8176da169998c203c1a93f6a6ff1 /docs/samples/modify_base.cpp
parent6457f0941204a79ec5ba359a12aa00bf06f0e621 (diff)
parent405fefc8777c55900a4e44561b545a9abb5276ba (diff)
Merge branch 'master' into compact
Diffstat (limited to 'docs/samples/modify_base.cpp')
-rw-r--r--docs/samples/modify_base.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/samples/modify_base.cpp b/docs/samples/modify_base.cpp
index bd63708..7c4819b 100644
--- a/docs/samples/modify_base.cpp
+++ b/docs/samples/modify_base.cpp
@@ -8,7 +8,7 @@ int main()
pugi::xml_document doc;
if (!doc.load_string("<node id='123'>text</node><!-- comment -->", pugi::parse_default | pugi::parse_comments)) return -1;
- //[code_modify_base_node
+ // tag::node[]
pugi::xml_node node = doc.child("node");
// change node name
@@ -21,9 +21,9 @@ int main()
// we can't change value of the element or name of the comment
std::cout << node.set_value("1") << ", " << doc.last_child().set_name("2") << std::endl;
- //]
+ // end::node[]
- //[code_modify_base_attr
+ // tag::attr[]
pugi::xml_attribute attr = node.attribute("id");
// change attribute name/value
@@ -37,7 +37,7 @@ int main()
// we can also use assignment operators for more concise code
attr = true;
std::cout << "final attribute value: " << attr.value() << std::endl;
- //]
+ // end::attr[]
}
// vim:et