I have a library that rotates under CF.NET and .NET, but serialization is different between them. As a result, the XML file created in CF.NET cannot be read in .NET, and for me this is a big problem!
Here is an example code:
[Serializable, XmlRoot("config")] public sealed class RemoteHost : IEquatable<RemoteHost> {
CF.NET xml:
<?xml version="1.0"?> <ArrayOfConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <config Name="A"> </config> </ArrayOfConfig>
.NET xml
<?xml version="1.0" encoding="ibm850"?> <ArrayOfRemoteHost xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <RemoteHost Name="A"> </RemoteHost> </ArrayOfRemoteHost>
How can I modify my program to create the same XML?
source share