Mega Code Archive

 
Categories / C# / XML
 

XmlReader Create (TextReader) creates a new XmlReader instance with the specified TextReader

using System; using System.IO; using System.Xml; using System.Xml.Linq; using System.Collections; using System.Collections.Generic; public class MainClass{    public static void Main(){         string xmlData ="<item productID='123'>" +                                 "<price>5.5</price>" +                                 "</item>";                  XmlReader reader = XmlReader.Create(new StringReader(xmlData));    } }