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" ?>
  <Asset Type="CustomDataTypes.ItemInfo">

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?


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.