all groups > dotnet xml > october 2004 >
You're in the

dotnet xml

group:

XSDObjectGen and generating multiple .cs files for multiple schema


XSDObjectGen and generating multiple .cs files for multiple schema Edward Clements
10/30/2004 8:47:01 AM
dotnet xml: I'm looking for a good tool to generate C# classes (from XSD-schemas) to
(de-)serialize XML corresponding to those schemas.

XSDObjectGen almost meets these requirements -- only, I need to generate a
..cs file for each common .xsd file that is included (xsd:include) -- there
are a lot schemas which include several common .xsd files (full schema at
http://www.witsml.org/schemas/WITSML120_2003-01-30.zip).

The "/s" switch would have beein ideal for this, only it still generates
only one .cs file -- maybe this is only for "imported" (as opposed to
"included") schemas?

Re: XSDObjectGen and generating multiple .cs files for multiple schema Stuart Celarier
11/1/2004 12:20:12 AM
[quoted text, click to view]

I don't know if it meets your needs, but how about [1] and the companion
article [2]? There's also CodeXS on Code Project [3].

Cheers,
Stuart Celarier, Fern Creek

[1]
http://msdn.microsoft.com/xml/default.aspx?pull=/library/en-us/dnxmlnet/html/xsdcodegen.asp
[2] http://weblogs.asp.net/cazzu/archive/2004/05/14/XsdCodeGenTool.aspx
[3] http://www.codeproject.com/useritems/CodeXS.asp

Re: XSDObjectGen and generating multiple .cs files for multiple sc Edward Clements
11/1/2004 5:43:01 AM
Stuart,

Both [1] and the companion [2] seem to be very interesting, only there's so
many things going on in those sources, that I'm not very sure...
Do you have any idea how/where I could patch XsdGenerator for this
requirement?
Any pointers? suggestions?

The CodeXS on Code Project [3] (as far as I could see) is an online service,
no source-code available...

Hope to hear from you soon,

Edward
Re: XSDObjectGen and generating multiple .cs files for multiple sche danro
11/1/2004 1:25:56 PM
Because of the way that we read the schema, we cannot distinguish between
included files. The /s option only works for import directives.
AddThis Social Bookmark Button