<system>
<version>1.0.0.0</version>
<url>http://yoursite.com/download/1.0.0.0/</url>
</system>
if you want to read those data according to element
then following codes surely help you.there are many
ways to read from a xml file.this is a way to read -
string xmlURL = "http://yoursite.com/info.xml";
reader = new XmlTextReader(xmlURL);
reader.MoveToContent();
string elementName = "";
if ((reader.NodeType == XmlNodeType.Element) && (reader.Name == "system"))
{
while (reader.Read())
{
// when we find an element node,
// we remember its name
if (reader.NodeType == XmlNodeType.Element)
elementName = reader.Name;
else
{
// for text nodes...
if ((reader.NodeType == XmlNodeType.Text) && (reader.HasValue))
{
// we check what the name of the node was
switch (elementName)
{
case "version":
NewVersion = new Version(reader.Value);
break;
case "url":
url = reader.Value;
break;
}
}
}
}
}