I tried following the answer to this question, but could not get xsd.exe to happily take the XSD files and turn them into a class.
Using the XSD files here: http://download.adamhaile.com/SO/XSD.zip
Can anyone help me convert these to a valid C# class that can then be used to serialize an XML document to?
Note: Yes, these are from an undocumented Yahoo Movies API that I’m trying to use. It looks like it’s using a standard Microsoft based schema pattern, so I would imagine this is quite possible.
Here is an example of the results from one of the API calls:
http://new.api.movies.yahoo.com/v2/listTheatersByPostalCode?pcode=12345&count=30&yprop=msapi
Be sure to put all referenced schemas on the cmd line.
When I do this, I get a bunch of warnings.
If I yank out yahooTheater.xsd from that list, it works fine.
I didn’t even look at the XSDs but it seems to me that xsd.exe thinks some elements have been doubly defined. you may be able to manually reconcile that problem by combining yahootheater.xsd with yahooTheaterAmenity.xsd. Or, if you don’t care about the amenity part, drop it.