I have the following model
[Serializable]
[XmlRoot("store-inventory", Namespace = "http://seller.marketplace.sears.com/catalog/v7", IsNullable = true)]
public class SearsInventoryFormModel {
public SearsItemInventoryModel[] Items { get; set; }
}
[XmlType("item")]
public class SearsItemInventoryModel {
// for inventory
[XmlArray("locations")]
[XmlArrayItem("location")]
public List<SearsLocationModel> Locations { get; set; }
[XmlAttribute("item-id")]
public string ItemID { get; set; }
}
And I got the following xml
<?xml version="1.0" encoding="utf-8"?>
<store-inventory xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://seller.marketplace.sears.com/catalog/v7">
<Items>
<item item-id="imps_twob_Black">
<locations>
<location location-id="295229030">
<quantity>4</quantity>
<low-inventory-threshold xsi:nil="true" />
<pick-up-now-eligible>false</pick-up-now-eligible>
<inventory-timestamp>2016-09-08T14:47:34.88605-04:00</inventory-timestamp>
</location>
</locations>
</item>
</Items>
</store-inventory>
How should I remove <Items>
tag? It looks like the model automatically generates that tag.