using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.OleDb;
using System.Xml;
public class MainClass{
public static void Main(){
XmlTextReader reader = new XmlTextReader(@"C:\books.xml");
while (reader.Read())
{
if (reader.Name != "bookstore")
reader.Skip();
else
{
Console.WriteLine("Name: "+reader.Name);
Console.WriteLine("Level of the node: " +reader.Depth.ToString());
Console.WriteLine("Value: "+reader.Value);
}
}
}
}
|