static void Main(string[] args) { XmlTextReader rdr = new XmlTextReader(" http://www.tcmb.gov.tr/kurlar/today.xml"); while (rdr.Read()) { if (rdr.NodeType.Equals(XmlNodeType.XmlDeclaration)) { rdr.Skip(); } else { switch (rdr.Name) { case "Isim": Console.WriteLine(rdr.Name); Console.WriteLine(rdr.Value); break; case "ForexSelling": Console.WriteLine(rdr.Name); Console.WriteLine(rdr.Value); break; case "Döviz Satis": Console.WriteLine("Döviz Satis"); if (rdr.HasAttributes) // This fails every time Console.WriteLine("Attribute @type: " + rdr.GetAttribute("Type")); break; } } } }