How to add data to dictonary from xml file
scenerio:
I proclaimed a dictator such as
Dictonary<string,string> SampleDict=new Dictonary<string,string>();
and my xml file looks like
<Data> <Element ValOne="1" ValTwo="0" /> <Element ValOne="2" ValTwo="2" /> <Element ValOne="3" ValTwo="4" /> <Element ValOne="4" ValTwo="6" /> <Element ValOne="5" ValTwo="8" /> <Element ValOne="6" ValTwo="10" /> <Element ValOne="7" ValTwo="12" /> <Element ValOne="8" ValTwo="14" /> <Element ValOne="9" ValTwo="16" /> <Element ValOne="10" ValTwo="18" /> </Data>
I need to read the value of "ValOne" and "ValTwo" using LINQ and paste the same into the above stated dictation
and how to add the contents of this word to a list containing two columns.
Please help me do this
Thanks in advance
source share