Parsing XML in C# .NET
You can use the order of XML nodes as field order:

&lt;importformat&gt;
    &lt;firstname/&gt;
    &lt;middlename/&gt;
    &lt;lastname/&gt;
&lt;/importformat&gt;


and parse it like that:

public static string[] GetFieldsOrder(string xmlContents)
{
    return XElement.Parse(xmlContents)
        .Elements()
        .Select(element =&gt; element.Name.LocalName)
        .ToArray();
}