Parsing an XML String into an Element
using System; using System.Linq; using System.Xml.Linq; using System.Collections.Generic; class Program//ww w . j ava 2 s. c om { static void Main(string[] args){ string xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?><Books>" + "<Book type=\"Author\" experience=\"first-time\" language=" + "\"English\"><FirstName>Joe</FirstName><LastName>Ruby</LastName>" + "</Book></Books>"; XElement xElement = XElement.Parse(xml); Console.WriteLine(xElement); } }