CSharp examples for System.Xml.Serialization:XmlSerializer
XML object from a string of the form.
using System.Xml.Serialization; using System.Text.RegularExpressions; using System.Text; using System.IO;//from ww w . j a v a 2 s . c o m using System.Globalization; using System.Collections.Generic; using System; public class Main{ /// <summary> /// XML object from a string of the form. /// </summary> /// <typeparam name="T"></typeparam> /// <param name="inXmlText"></param> /// <returns></returns> public static T FromXml<T>(String inXmlText) { var serializer = new XmlSerializer(typeof(T)); return (T)serializer.Deserialize(new StringReader(inXmlText)); } }