Quantcast
Viewing all articles
Browse latest Browse all 543

Commented Issue: Issue with XmlChoiceIdentifier and enums [9877]

Hello,
I use the last version (3.0) and I have some big issues while creating XmlSerializer with classes generated from NewsML-G2 xsd files.
http://www.iptc.org/std/NewsML-G2/NewsML-G2_2.4.zip

During the runtime, when I create the serializer, a lot of innerexception leads to the exception:
"Type of choice identifier 'ItemElementName' is inconsisitent with type of 'Item'. Please use List<>... of <namespace>.ItemChoiceType."
The thing is that the XmlChoiceIdentifierAttribute is correctly ItemElementName, and the ItemElementName is of the list<ItemChoiceType>.

Then I try to generate the same class, but this type with arrays instead of List. Then it says:
"Type ItemsChoiceType is missing enumeration value 'Items' for element 'Items' from namespace ''.""

So ok, I tried to add Items in the enum, and it goes to the next issue which is the same but in another type.
I feel this is a mistake in the class generator, but I don't really understand why it needs the type Items in the enum? Is this a bug, a mistake in the schema?
Please help!
Comments: ** Comment from web user: mightymuke **

This "should" work if you build the latest version and include the patch from here: http://xsd2code.codeplex.com/workitem/14767


Viewing all articles
Browse latest Browse all 543

Trending Articles



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