What are you using to view the data afterwards. If you were saving the XML out as a .XML file and then viewing it in Internet Explorer, or a real XML tool, then it will do the formating for you. If you are just looking at the result in Query Analyzer I don't know what to tell you.
David Lundell
Principal Consultant and Trainer
www.mutuallybeneficial.com