Writing XML file



Is there a way to write the XMLDocument to a file ?
I want to export a config file. I can create a XMLDocument, but how to write it to a file the Juce’s way ?


Ok, I’m replying to myself.

I think the only way is to use XMLElement::writeToFile.
It’s okay.


that’s the easiest way :slight_smile: there are always many ways to achieve things, and you’ve found jules’ nice happy friendly way. you could also have output the whole thing to a string, and then written that to a file (sometimes useful in certain situations, where you want to embed XML within a different text-based format)