Please show me, how to deserialize this one in XmlSerializer
<Root>
<Ship KindID=0>
<Ship0 Name='A' />
<Ship1 Name='B' />
<Ship2 Name='C' />
</Ship>
<Ship KindID=1>
<Ship3 Name='AA' />
<Ship4 Name='BB' />
<Ship4 Name='cC' />
</Ship>
</Root>
To
public class Ships {
public List<Ship> Ships {get; set;}
}
public class Ship {
public string Name {get;set;}
public int KindID {get;set;}
}
I want the way to deserialize without navigating all xml path manual. Just do XmlSerializer.Deserialize(mem, obj)
Thanks
You can deserialize something like that.
Once you have collection you can use Linq
You will have list of names of all the ships