# XML Output Formatting Issues

**URL:** <https://forum.kirupa.com/t/xml-output-formatting-issues/214371>\
**Category:** flash\
**Created:** [January 28, 2007, 2:40am UTC](https://forum.kirupa.com/t/xml-output-formatting-issues/214371 "2007-01-28T02:40:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robbe](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/robbe/32/2016_2.png) [@Robbe](https://forum.kirupa.com/u/Robbe)\
**Post date:** [January 28, 2007, 2:40am UTC](https://forum.kirupa.com/t/xml-output-formatting-issues/214371/1 "2007-01-28T02:40:38Z")

</div>

I’m having issues trying to get proper XML formatting with my output as below:

```auto
var loaderMC = _root.createEmptyMovieClip("loader_mc", 1234);
loaderMC.filename = "filename.xml";
loaderMC.data = "<blah> here's some data </blah>";
loaderMC.getURL("[http://server.com/saveData.php",](http://server.com/saveData.php%22,) '_blank', 'POST');

```

When I try to add additional lines I get validation errors in flash (Actionscript).

Plus when I append the XML header, flash thinks the tags represent the end of my data:

```auto
<?xml version="1.0" encoding="UTF-8"?>

```

The “1.0” ruins flashes ability to find the end of my data line.

How can I a) Format my output XML so that it saves locally in the proper format such as:

```auto
<?xml version="1.0" encoding="UTF-8"?>
     <blah>here's some data</blah>
        <moreblah>
           <evenMore>Third Aggregate</evenMore>
        </moreblah>

```

And b) how can I output flash restrictive characters without upsetting my flash?

Thanks a ton!
