Xml Serialization and Enums

Hi all. Just wondering if anyone know how to correctly format enums in XML files so that the content pipeline doesn’t complain when compiling them. I’ve created a custom class ItemInfo:

namespace CustomDataTypes {
  public enum ItemType { Edible }

  public class ItemInfo {
    public string key;
    public ItemType itemType;
  }
}

and I’ve been trying to set up corresponding XML like so:

<?xml version="1.0" encoding="UTF-8" ?>
<XnaContent>
  <Asset Type="CustomDataTypes.ItemInfo">
    <key>blackberry</key>
    <itemType>Edible</itemType> 
  </Asset>
</XnaContent>

This is just one of the many things I’ve tried and I can’t find a good guide about how to do this properly, if it’s even possible. Anyone know?

Thanks.

I figured this out. Apparently the XML fields are order-dependent. Good to know! This is a pared-down example of my actual XML files and I had a few fields switched around in those. Looks like enum serialization works great.