# XML to file - keep it pretty?

**URL:** <https://forum.kirupa.com/t/xml-to-file-keep-it-pretty/311123>\
**Category:** flash\
**Created:** [June 28, 2010, 3:44pm UTC](https://forum.kirupa.com/t/xml-to-file-keep-it-pretty/311123 "2010-06-28T15:44:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![slopps](https://avatars.discourse-cdn.com/v4/letter/s/df788c/32.png) [@slopps](https://forum.kirupa.com/u/slopps)\
**Post date:** [June 28, 2010, 3:44pm UTC](https://forum.kirupa.com/t/xml-to-file-keep-it-pretty/311123/1 "2010-06-28T15:44:33Z")

</div>

NOTE: Problem sort of solved. It appears it was only losing its formatting when viewed in notepad…in almost anything else it appears fine.

Hi all!  
I’m using FileReference to save out an XML file but passing the XML object as the save parameter. The only problem is, the written file doesn’t hold the pretty visual formatting and indenting. While any XML parser can still read it, it’s nearly impossible for human eyes to decipher…

Any ideas?
