backus
backus

Reputation: 4316

Basic Standards of Exporting to XML?

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?

Upvotes: 2

Views: 126

Answers (1)

Peladao
Peladao

Reputation: 4090

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

Upvotes: 3

Related Questions