diff options
author | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2015-04-08 21:44:16 -0700 |
---|---|---|
committer | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2015-04-08 21:44:16 -0700 |
commit | 65e90b2d7a86383243e380b2658fad26dce370f0 (patch) | |
tree | 95f418c94216831b595a98f2e56768a6bdcbdab9 /docs/samples/load_file.cpp | |
parent | 084ecd454a06d6da0304d0b7ccde8e8917b1ea26 (diff) |
docs: Add docs folder from master
Diffstat (limited to 'docs/samples/load_file.cpp')
-rw-r--r-- | docs/samples/load_file.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/docs/samples/load_file.cpp b/docs/samples/load_file.cpp new file mode 100644 index 0000000..8b2191b --- /dev/null +++ b/docs/samples/load_file.cpp @@ -0,0 +1,16 @@ +#include "pugixml.hpp" + +#include <iostream> + +int main() +{ +// tag::code[] + pugi::xml_document doc; + + pugi::xml_parse_result result = doc.load_file("tree.xml"); + + std::cout << "Load result: " << result.description() << ", mesh name: " << doc.child("mesh").attribute("name").value() << std::endl; +// end::code[] +} + +// vim:et |