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/load_options.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/load_options.cpp')
-rw-r--r-- | docs/samples/load_options.cpp | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/docs/samples/load_options.cpp b/docs/samples/load_options.cpp index 82273aa..c192914 100644 --- a/docs/samples/load_options.cpp +++ b/docs/samples/load_options.cpp @@ -4,25 +4,27 @@ int main()
{
- pugi::xml_document doc;
+ pugi::xml_document doc;
//[code_load_options
- const char* source = "<!--comment--><node><</node>";
+ const char* source = "<!--comment--><node><</node>";
- // Parsing with default options; note that comment node is not added to the tree, and entity reference < is expanded
- doc.load(source);
- std::cout << "First node value: [" << doc.first_child().value() << "], node child value: [" << doc.child_value("node") << "]\n";
+ // Parsing with default options; note that comment node is not added to the tree, and entity reference < is expanded
+ doc.load(source);
+ std::cout << "First node value: [" << doc.first_child().value() << "], node child value: [" << doc.child_value("node") << "]\n";
- // Parsing with additional parse_comments option; comment node is now added to the tree
- doc.load(source, pugi::parse_default | pugi::parse_comments);
- std::cout << "First node value: [" << doc.first_child().value() << "], node child value: [" << doc.child_value("node") << "]\n";
+ // Parsing with additional parse_comments option; comment node is now added to the tree
+ doc.load(source, pugi::parse_default | pugi::parse_comments);
+ std::cout << "First node value: [" << doc.first_child().value() << "], node child value: [" << doc.child_value("node") << "]\n";
- // Parsing with additional parse_comments option and without the (default) parse_escapes option; < is not expanded
- doc.load(source, (pugi::parse_default | pugi::parse_comments) & ~pugi::parse_escapes);
- std::cout << "First node value: [" << doc.first_child().value() << "], node child value: [" << doc.child_value("node") << "]\n";
+ // Parsing with additional parse_comments option and without the (default) parse_escapes option; < is not expanded
+ doc.load(source, (pugi::parse_default | pugi::parse_comments) & ~pugi::parse_escapes);
+ std::cout << "First node value: [" << doc.first_child().value() << "], node child value: [" << doc.child_value("node") << "]\n";
- // Parsing with minimal option mask; comment node is not added to the tree, and < is not expanded
- doc.load(source, pugi::parse_minimal);
- std::cout << "First node value: [" << doc.first_child().value() << "], node child value: [" << doc.child_value("node") << "]\n";
+ // Parsing with minimal option mask; comment node is not added to the tree, and < is not expanded
+ doc.load(source, pugi::parse_minimal);
+ std::cout << "First node value: [" << doc.first_child().value() << "], node child value: [" << doc.child_value("node") << "]\n";
//]
}
+
+// vim:et
|