summaryrefslogtreecommitdiff
path: root/docs/samples
diff options
context:
space:
mode:
authorarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2010-07-06 12:23:48 +0000
committerarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2010-07-06 12:23:48 +0000
commit382a33ce4b19ccc9b6f89268a0de17eeac63f559 (patch)
tree3eb77fddefdbb9650923adeb0908bce12139e32c /docs/samples
parent57564791a30e053f902299763494f09784eec0c3 (diff)
docs: Added contents-based traversal documentation, minor spelling fix
git-svn-id: http://pugixml.googlecode.com/svn/trunk@562 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'docs/samples')
-rw-r--r--docs/samples/traverse_base.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/docs/samples/traverse_base.cpp b/docs/samples/traverse_base.cpp
index 6f82caa..7559859 100644
--- a/docs/samples/traverse_base.cpp
+++ b/docs/samples/traverse_base.cpp
@@ -39,16 +39,11 @@ int main()
std::cout << std::endl;
//[code_traverse_base_contents
+ std::cout << "Tool for *.dae generation: " << tools.find_child_by_attribute("Tool", "OutputFileMasks", "*.dae").attribute("Filename").value() << "\n";
+
for (pugi::xml_node tool = tools.child("Tool"); tool; tool = tool.next_sibling("Tool"))
{
- std::cout << "Tool " << tool.attribute("Filename").value() << ":";
-
- for (pugi::xml_attribute attr = tool.first_attribute(); attr; attr = attr.next_attribute())
- {
- if (strcmp(attr.name(), "Filename") != 0) std::cout << " " << attr.name() << "=" << attr.value();
- }
-
- std::cout << std::endl;
+ std::cout << "Tool " << tool.attribute("Filename").value() << "\n";
}
//]
}