I'm trying to write a wrapper for rapidXML in order to use it in my projects however I've run into a curious bug that's preventing me from properly saving the XML documents I'm working with. The gist of it is: simply parsing a very simple xml doc and then saving the same document to the same file (without modifying it) creates a mostly correct output except for scrambling a few node closures:
I'm totally lost as to what might be causing this.
As a foot note: I'm almost certain it's not an issue with the parse() function.
If I parse() the document and then call std::cout<<doc; it prints the document perfectly fine to the console, but for some reason std::ofstream<<doc; causes issues.