I'm a beginner C# developer, actually, i'm coding a game.
My question is about load an XML from my windows phone app.
I have a list of object that I'd like to fill with my xml's element.
But the problem is that I can't serialize more than one Element.
I'd like to store data (image's position) in my list.
Maybe my code will help you better understand what I mean
[XmlRoot("root")]
public class Map
{
[XmlElement]
public int IdTexture { get; set; }
[XmlArray(ElementName = "Buildings")]
[XmlArrayItem(ElementName = "Building")]
public List<Buildings> Build_list { get; set; }
[XmlArray(ElementName = "Trees")]
[XmlArrayItem(ElementName = "Tree")]
public List<Trees> Trees_list { get; set; }
[XmlArray(ElementName = "Rocks")]
[XmlArrayItem(ElementName = "Rock")]
public List<Rock> Rock_list { get; set; }
[XmlArray(ElementName = "Roads")]
[XmlArrayItem(ElementName = "Road")]
public List<Road> Road_list { get; set; }
//[XmlElement]
[XmlArray(ElementName = "Bornes")]
[XmlArrayItem(ElementName = "Borne")]
public List<Bornes> Bornes_list { get; set; }
public void Map()
{
Build_list = new List<Buildings>();
Trees_list = new List<Trees>();
Rock_list = new List<Rock>();
Road_list = new List<Road>();
Bornes_list = new List<Bornes>();
}
what should I use?