I need to copy a XML file to a text file and keep the xml structure.

I can do it manually by opening the xml file,selecting the info, copy, and then open notepad and paste.

I need to do it from a script.
If I use filecopy2 it loses the formatting and puts everything in 1 line.

the XML structure is something like this:
<?xml version="1.0" encoding="utf-8" ?>
- <legend>
- <categories>
- <category>
<id>all</id>
- <title>
- <![CDATA[ Categories
]]>
</title>
- <alt>
- <![CDATA[ Select,Deselect,<br><b>all</b> categories
]]>
</alt>
<style>headingText</style>
<textColor>0x000000</textColor>
</category>
- <category>
<id>none</id>
- <title>
- <![CDATA[ None
]]>
</title>
<bgColor>0xc1c8d9</bgColor>
<textColor>0x000000</textColor>
</category>

if I use file copy it changes the structure to(all one line)
<?xml version='1.0' encoding='UTF-8' standalone='no'?><events><event><event_id>0</event_id><title>2nd Interview with State</title><date

Any Ideas
Thanks
Charlie Crimmel