All I want to do is get the value of the element is the following piece of code...
if(System.IO.File.Exists(m_appConfig))
{
XmlTextReader MyReader = new XmlTextReader(m_appConfig);
MyReader.Read();
while(MyReader.Read()){
MyReader.MoveToElement();
if(MyReader.NodeType==XmlNodeType.Element){
AppPaths.Add(MyReader.Name,MyReader.Value);
}
}
MyReader.Close();
}
Problem is "Value" is an empty string. A few more iterations and "Text" NodeType shows the value. Can't I get it all at once? Please let me know what you think.
Thanks for your thoughts.
if(System.IO.File.Exists(m_appConfig))
{
XmlTextReader MyReader = new XmlTextReader(m_appConfig);
MyReader.Read();
while(MyReader.Read()){
MyReader.MoveToElement();
if(MyReader.NodeType==XmlNodeType.Element){
AppPaths.Add(MyReader.Name,MyReader.Value);
}
}
MyReader.Close();
}
Problem is "Value" is an empty string. A few more iterations and "Text" NodeType shows the value. Can't I get it all at once? Please let me know what you think.
Thanks for your thoughts.