I am using TinyXML to save and print XML documents.
While printing the document I am getting:
<document>
<data>1</data>
<data>2</data>
<data>3</data>
</document>
as result.
But I want the result to be printed in a single line like this:
<document><data>1</data><data>2</data><data>3</data></document>
How can I do this?
Based on the documentation (copied below), I assume you're using
Print
orSave
, so you get "pretty printed" outputbut as you see from the alternatives above and also from this documentation, you can instead use the
<<
operator to output directly to anostream
, where the documentation saysSo to save to a file, something like this