I grabbed some data from a computer in the local network and placed it inside an ADO.NET DataTable and saved it to an Xml file in the local computer by calling the XmlWrite() method on the object and specifying XmlWriteMode.WriteSchema as the second argument.
The Xml file was saved successfully, but when I later tried to open the same Xml file using the XmlRead() method, I kept getting an exception indicating that the data could not be read, apparently because the format of the data was not recognizable, or something along those lines.
I reviewed the Xml file and didn't find any weird unicode characters in there. I also tried to write the Xml file by passing a FileStream object to the XmlWrite method and specifying the Encoding but that didn't solve the problem when i later tried to have the DataTable read the Xml file.
Could this problem be related to the fact that the data that was loaded onto the first DataTable came from a spreadsheet file sitting on a computer running a 32 bit operating system, but when I tried to read the Xml file (after I saved it on the local computer via XmlWrite()) the data had been somehow made illegible by the fact that the local computer is running windows 7 64 bit?
Someone mentioned something about a byte mark or something like that. Does anyone have a clue?