using System;
using System.Linq;
using System.Xml;
using System.Xml.Linq;
using System.Collections;
using System.Collections.Generic;
using System.Xml.XPath;
public class MainClass
{
public static void Main()
{
XmlReaderSettings settings = new XmlReaderSettings();
settings.Schemas.Add("http://www.domain.com/books", "domainBooks.xsd");
settings.ValidationType = ValidationType.Schema;
XmlReader reader = XmlReader.Create("domainBooks.xml", settings);
XPathDocument document = new XPathDocument(reader);
XPathNavigator navigator = document.CreateNavigator();
navigator.MoveToChild("bookstore", "http://www.domain.com/books");
navigator.MoveToChild("book", "http://www.domain.com/books");
navigator.MoveToChild("price", "http://www.domain.com/books");
Console.WriteLine(navigator.ValueType);
string price = navigator.ValueAs(typeof(string)) as string;
Console.WriteLine(price);
}
}
/*
*/