public static void Main()
StringBuilder output = new StringBuilder();
String xmlString = @"<bookstore>
<book genre='autobiography' publicationdate='1981-03-22' ISBN='1-861003-11-0'>
<title>The Autobiography of Benjamin Franklin</title>
<first-name>Benjamin</first-name>
<last-name>Franklin</last-name>
<price>1.3000000e+001</price>
using (XmlReader reader = XmlReader.Create(new StringReader(xmlString)))
reader.ReadToFollowing("book");
reader.MoveToFirstAttribute();
string genre = reader.Value;
output.AppendLine("The genre value: " + genre);
reader.ReadToFollowing("price");
output.AppendLine("Price: " + Decimal.Parse(reader.ReadElementContentAsString(),System.Globalization.NumberStyles.Float));
Console.WriteLine("Hello World" + output.ToString());