I have got XML response from my client. I can't deserialize the XML as string, it throws an Illegal characters in path error. So now I save the file in temp folder and retrieve that. Is it possible to do the deserialize without saving the XML file first?
string xml = Post();
XmlSerializer deserializer = new XmlSerializer(typeof(Envelope));
TextReader reader = new StreamReader(xml); <-- Illegal characters in path error -->
object obj = deserializer.Deserialize(reader);
Envelope XmlData = (Envelope)obj;
reader.Close();
No comments:
Post a Comment