Moves to the first attribute.
using System; using System.IO; using System.Xml; public class Sample { public static void Main() { XmlTextReader reader = null; try { reader = new XmlTextReader("attrs.xml"); reader.MoveToContent(); reader.MoveToFirstAttribute(); string genre=reader.Value; Console.WriteLine("The genre value: " + genre); } finally { if (reader != null) reader.Close(); } } }