Reading Xml

Nov 30 2010 9:13 AM

hey guys..i want to read some datas from a website that are in xml document..i wrote that codes below
XmlTextReader xtr = new XmlTextReader("Dosya3.xml");
while (xtr.Read())
{
if (xtr.NodeType == XmlNodeType.Element)
Console.WriteLine("{0}", xtr.Name);
if (xtr.HasAttributes)
{
while (xtr.MoveToNextAttribute())
Console.WriteLine("{0}={1}", xtr.Name, xtr.Value);
Console.Write("\n");
}
}
Console.ReadLine();

i can read Xml file including with that codes that i created but not from website..should i do something else to read from website..here is the structure of the web site xml file http://img228.imageshack.us/f/22741667.jpg/

Answers (6)