diff options
author | arseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640> | 2010-07-06 12:23:48 +0000 |
---|---|---|
committer | arseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640> | 2010-07-06 12:23:48 +0000 |
commit | 382a33ce4b19ccc9b6f89268a0de17eeac63f559 (patch) | |
tree | 3eb77fddefdbb9650923adeb0908bce12139e32c /docs/samples/traverse_base.cpp | |
parent | 57564791a30e053f902299763494f09784eec0c3 (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/traverse_base.cpp')
-rw-r--r-- | docs/samples/traverse_base.cpp | 11 |
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";
}
//]
}
|