i am trying loading and saving data by Robert Harvey code in this topic. i can save. but load process is not success full.
i have tried :
var list = XmlHelper.FromXmlFile<List<Item>>(@"c:\folder\file.xml");
i did not find the correct namespase for Item
var list = XmlHelper.FromXmlFile<List<Array>>(@"c:\folder\file.xml");
{"Object reference not set to an instance of an object."}
var list = XmlHelper.FromXmlFile<List<ArrayList>>(@"c:\folder\file.xml");
{"<ArrayOfAnyType xmlns=''> was not expected."}
var list = XmlHelper.FromXmlFile<List<Double>>(@"c:\folder\file.xml");
{"<ArrayOfAnyType xmlns=''> was not expected."}
but all of them have error which listed below them.
i want to retrieve those number in form of arraylist or double[];
the XML content :
First Load the Document:
Then you can access the Elements with
If you got more than one Element with the same name you can get them with:
You can Access Attributes kind of similar:
and
don't forget to always do null checks.
I hope this helps.