Deserialization of XML back to the object form


public object GetDeSerializedObject(string pXml, System.Type type)
{
    object result;

    try
    {
        XmlSerializer serializer = new XmlSerializer(type);

        using (TextReader reader = new StringReader(pXml))
        {
            result = (object)serializer.Deserialize(reader);
        }
    }
    catch (Exception ex)
    {
        result = null;
    }
    finally
    {
    }

    return result;
}

XML Serialization and Deserialization