Hi,

i have the following issue with xml deserialization:

I have a xml schema which uses a "choice" - when i try to deserialize a XML
file based on this schema into a class instance i get the following error
message

Unhandled Exception: System.InvalidOperationException: There is an error in
XML document. ---> System.InvalidOperationException: Read by order only
possible for encoded/bare format
  at System.Xml.Serialization.ClassMap.GetElement (Int32 index) [0x00000]
in <filename unknown>:0
  at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadMembers
(System.Xml.Serialization.ClassMap map, System.Object ob, Boolean
isValueList, Boolean readBySoapOrder) [0x00000] in <filename unknown>:0
  at
System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadClassInstanceMembers
(System.Xml.Serialization.XmlTypeMapping typeMap, System.Object ob)
[0x00000] in <filename unknown>:0
  at
System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadClassInstance
(System.Xml.Serialization.XmlTypeMapping typeMap, Boolean isNullable,
Boolean checkType) [0x00000] in <filename unknown>:0
  at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadObject
(System.Xml.Serialization.XmlTypeMapping typeMap, Boolean isNullable,
Boolean checkType) [0x00000] in <filename unknown>:0
  at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadRoot
(System.Xml.Serialization.XmlTypeMapping rootMap) [0x00000] in <filename
unknown>:0
  at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadRoot ()
[0x00000] in <filename unknown>:0
  at System.Xml.Serialization.XmlSerializer.Deserialize
(System.Xml.Serialization.XmlSerializationReader reader) [0x00000] in
<filename unknown>:0
  --- End of inner exception stack trace ---

The code itself works. It works with microsoft .net and works also pretty
good with with mono 2.6.7 ... but it seems that all mono version after
2.6.7 are no longer able to process the "choice" ?
(btw: Code was compiled with VS)

Is this a known issue?

thanks
JS
_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to