using System;
using System.IO;
using System.Xml;
class MainClass
{
static void Main(string[] args)
{
//StringReader stream = new StringReader("Sample.xml");
// Thanks for Scott R (rradjah at yahoo.com)
StringReader stream = new StringReader("<?xml version='1.0'?><foo></foo>");
XmlTextReader reader = new XmlTextReader(stream);
while (reader.Read())
{
//TODO -
}
if (reader != null)
reader.Close();
}
}
|