tags:

views:

43

answers:

1

I'm just writing a small, data gathering application, and I want to export the output to XML. Is it perfectly find if the output just looks like this?

<?xml version="1.0" encoding="ISO-8859-1"?>
<output>
    <data>
        foo
    </data>
    <data>
        foo2
    </data>
    <data>
        foo3
    </data>
    <data>
        foo4
    </data>
</output>

Or is there anything special I need to add, for applications like excel to recognize my XML?

+2  A: 

Always include the XML declaration. It defines the XML version and the encoding. See http://www.w3schools.com/xml/xml_tree.asp

Peladao
Thanks, I've added this to my example, in case anyone else thinks there is something else I should include.
bball