Does anyone know why the following XML generated by a data serializer in C # works fine on Windows, but not on Linux on Mono?
XML:
<Message i:type="UserMessage" xmlns="http://schemas.datacontract.org/2004/07/NetTunnel"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><type>UserMessage</type>
<nick>Unnamed</nick><services><Service><enabled>true</enabled><port_ranges i:nil="true"/>
<service_name>vent</service_name></Service></services><state>Created</state>
<userid>1</userid></Message>
Error:
Unhandled Exception: System.Runtime.Serialization.SerializationException: Deserializing
type 'System.Object'. Expecting state 'EndElement'. Encountered state 'Element' with
name 'enabled' with namespace 'http://schemas.datacontract.org/2004/07/NetTunnel'.
It also gives me an error if there are no services listed (xml tag <services/>). The service variable is of type List<Service>. Is this just the type of Mono can't handle? Would another type be more suitable? Or is it completely different?
source
share