title: XML Inventory System
body: <p>I'm trying to test an inventory system I'm making, but I want to make it with XML.
  putting in the codes and such like:</p>
  
  <pre><code>    &lt;Item&gt;
    &lt;ItemName ItemName = "Apple"&gt;
      &lt;ItemQuantity&gt;1&lt;/ItemQuantity&gt;
      &lt;ItemMaxQuantity&gt;64&lt;/ItemMaxQuantity&gt;
      &lt;ItemState&gt;PERFECT&lt;/ItemState&gt;
    &lt;/ItemName&gt;
  
    &lt;ItemName ItemName = "Sword"&gt;
      &lt;ItemQuantity&gt;1&lt;/ItemQuantity&gt;
      &lt;ItemMaxQuantity&gt;1&lt;/ItemMaxQuantity&gt;
      &lt;ItemState&gt;BROKEN&lt;/ItemState&gt;
    &lt;/ItemName&gt;
  &lt;/Item&gt;
  </code></pre>
  
  <p>I know how to Serialize and such. But don't know how to further put them in the game, having multiple items like I've shown.
  I have an inventory class. 
  That's like this:</p>
  
  <pre><code>namespace inventory_test
  {
      class Inventory
      {
          public enum ItemState
          {
              NONE,
              PERFECT,
              FINE,
              BROKEN,
              DESTROYED
          };
  
          /*public enum ItemType
          {
              FOOD,
              USEABLE,
              WEAPON,
              KEY,
              TOOL
          }; Implement this in the test later*/
  
          [XmlElement("ItemName")]
          public string ItemName
          { get; set; }
  
          [XmlElement("ItemState")]
          public string ItemState
          { get; set; }
  
          [XmlElement("ItemQuantity")]
          public string Quantity
          { get; set; }
  
          [XmlElement("ItemMaxQuantity")]
          public string MaxQuantity
          { get; set; }
  
          static void AddItem(int itemID, string itemState, int quantity, int maxquantity)
          {
  
          }
  
  
      }
  }
  </code></pre>
  
  <p>This is my program.cs:</p>
  
  <pre><code>    namespace inventory_test
  {
      class Program
      {
          static void Main(string[] args)
          {
          }
  //Serialization
          static public void Serialize(Inventory inventory)
          {
              XmlSerializer serializer = new XmlSerializer(typeof(Inventory));
              using (TextWriter writer = new StreamWriter(@"C:\Xml.xml"))
              {
                  serializer.Serialize(writer, inventory);
              }
          }
      }
  }
  </code></pre>
  
  <p>I have no idea what I have to do now.
  I'm really stuck right now and don't know what to to do.
  Help me :)?</p>