using System;
using System.IO;
using System.Xml;
public class Sample
{
public static void Main(){
// Create the reader.
XmlReader reader = XmlReader.Create("book4.xml");
reader.MoveToContent();
// Display each of the attribute nodes, including default attributes.
while (reader.MoveToNextAttribute()){
if (reader.IsDefault)
Console.Write("(default attribute) ");
Console.WriteLine("{0} = {1}", reader.Name, reader.Value);
}
//Close the reader.
reader.Close();
}
} // End class