• While I'm here is there a way to surpress the top line?

    <?xml version="1.0" encoding="utf-8" ?>

    - <Report xsi:schemaLocation="XML_test http://reportserver?%2FXML_test&rs%3AFormat=XML&rc%3ASchema=True" Name="XML_test" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="XML_test">

    I don't think you should remove that.

    Those lines are required as part of the XML standard.

    The first part is declaring that the document is supposed to conform to the XML 1.0 standard. (whether it actually conforms or not is a separate issue).

    The second part informs any XML parsing/reading application what schema to use to interpret the XML.

    XML as a format is essentially designed so that you can make up your own tags. However, that requires an XML schema document that describes what all the tags are and how to interpret them, i.e. how to read the XML file.

    All of this depends on what you plan to do with the XML file. If you are planning to send it to another application that will import it into another system then I would suggest you leave it. You also shouldn't worry about the formatting (you mentioned having the records "vertical") because an XML importer shouldn't care about that.

    If on the other hand you are sending this to a person for them to read then I suggest XML is not the right format. It's not particularly friendly for humans to read.