using System;
using System.IO;
using System.Xml;
public class Sample
{
public static void Main(){
XmlReaderSettings settings = new XmlReaderSettings();
settings.ValidationType = ValidationType.Schema;
settings.Schemas.Add("urn:items", "item.xsd");
XmlReader reader = XmlReader.Create("item.xml", settings);
reader.ReadToFollowing("price");
Console.WriteLine(reader.ValueType);
Decimal price = (Decimal) reader.ReadElementContentAsObject();
price = Decimal.Add(price, 2.50m);
}
}
/*
Book
9.95
2000
*/