senjuhashirama / pugixml

Automatically exported from code.google.com/p/pugixml
0 stars 0 forks source link

Append to a File #194

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I want pugi to open a xml file and add new childs but not overwrite it.

Is it possible to do this with pugi?

Original issue reported on code.google.com by muzaffer...@gmail.com on 6 Feb 2013 at 3:33

GoogleCodeExporter commented 9 years ago
You can do this with xml_document::save(ostream&) function:

std::ofstream out(path, std::ios::out | std::ios::app);
doc.save(out);

Original comment by arseny.k...@gmail.com on 6 Feb 2013 at 3:51

GoogleCodeExporter commented 9 years ago
Thanks a lot.

Original comment by muzaffer...@gmail.com on 6 Feb 2013 at 3:52

GoogleCodeExporter commented 9 years ago

Original comment by arseny.k...@gmail.com on 10 Feb 2013 at 7:47