Quantcast
Channel: XML, System.Xml, MSXML and XmlLite forum
Viewing all articles
Browse latest Browse all 935

For an valid XML getting error as "There is an error in XML document (1, )" while De-serializing for the first time

$
0
0

For an valid XML getting error as "There is an error in XML document (1, )" while De-serializing for the first time and again if re-run the same XML successfully getting De-serialized.

Can anyone help me on fixing this issue. Below is the code 

using (StreamReader xmlDocument = new StreamReader(file.FullName))
   {
XmlSerializer serializer = new XmlSerializer(typeof(PatientUpdate));
PatientUpdate objPatientUpdate = (PatientUpdate)serializer.Deserialize(xmlDocument); == Here i m geeting the error
xmlDocument.Close();


Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>