summaryrefslogtreecommitdiff
path: root/docs/samples/modify_base.cpp
diff options
context:
space:
mode:
authorArseny Kapoulkine <arseny.kapoulkine@gmail.com>2015-03-21 21:03:01 -0700
committerArseny Kapoulkine <arseny.kapoulkine@gmail.com>2015-03-21 21:03:01 -0700
commit1a450b302a6339319ed2430312f536ca7690b6a6 (patch)
tree5820a1ba42dec10df4d8fd7c1ccc9031f9f38dd1 /docs/samples/modify_base.cpp
parent23e9beb003d947e87dc03904c22db1547010b9df (diff)
docs: Use AsciiDoc-compatible comments in samples
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