been trying and going insane
I have written an xml doc like he following:
<Main>
<Something1>valueHere</Something1>
<Something2>valueHere</Something2>
</Main>
but how do I read the first element (Something1) and then the text inbetween? (valueHere)
this is what I have:
but it only gets the Name (Somethingx) but not the inner value.Code:XmlTextReader tr = new XmlTextReader(path); while(tr.Read()) { if (tr.NodeType == XmlNodeType.Text) { tr.ReadString(); if (tr.Name.Equals("Something1")) { //value/name } .. .. } }
any ideas?




Reply With Quote