public static T GetXmlObject<T>(string xmlString)
{
//Export to String
try
{
XmlSerializer serializer = new XmlSerializer(typeof(T));
TextReader tr = new StringReader(xmlString);
XmlReader xreader = new XmlTextReader(tr);
T xmlClassObject = (T)serializer.Deserialize(xreader);
return xmlClassObject;
}
catch
{
throw;
}
}
{
//Export to String
try
{
XmlSerializer serializer = new XmlSerializer(typeof(T));
TextReader tr = new StringReader(xmlString);
XmlReader xreader = new XmlTextReader(tr);
T xmlClassObject = (T)serializer.Deserialize(xreader);
return xmlClassObject;
}
catch
{
throw;
}
}
No comments:
Post a Comment