Mercurial > minori
comparison dep/pugixml/docs/samples/save_file.cpp @ 55:d10b6c6b432e
add xml lib, we will need to use it eventually
| author | Paper <mrpapersonic@gmail.com> |
|---|---|
| date | Tue, 26 Sep 2023 12:37:08 -0400 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 54:466ac9870df9 | 55:d10b6c6b432e |
|---|---|
| 1 #include "pugixml.hpp" | |
| 2 | |
| 3 #include <iostream> | |
| 4 | |
| 5 int main() | |
| 6 { | |
| 7 // get a test document | |
| 8 pugi::xml_document doc; | |
| 9 doc.load_string("<foo bar='baz'>hey</foo>"); | |
| 10 | |
| 11 // tag::code[] | |
| 12 // save document to file | |
| 13 std::cout << "Saving result: " << doc.save_file("save_file_output.xml") << std::endl; | |
| 14 // end::code[] | |
| 15 } | |
| 16 | |
| 17 // vim:et |
