473,698 Members | 2,203 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XSDObjectGen and generating multiple .cs files for multiple schema

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?

Is there any way to generate one .cs file for each included .xsd file?
Nov 12 '05 #1
3 4737
Edward wrote:
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...


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/defaul...xsdcodegen.asp
[2] http://weblogs.asp.net/cazzu/archive...deGenTool.aspx
[3] http://www.codeproject.com/useritems/CodeXS.asp
Nov 12 '05 #2
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

Nov 12 '05 #3
Because of the way that we read the schema, we cannot distinguish between
included files. The /s option only works for import directives.

Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2287
by: Pavan | last post by:
Hi, I received an error from a schema using the much hyped XSDObjectGen: Unexpected error occured in XSDObjectGen : Specified cast is not valid. Please send the schema to support. However xsd.exe (.NET v1.1) worked ok (did'nt give an error). I wonder how long we'll have to wait before we get a stable and comprehensive conversion from schema to class.
5
2764
by: colinco | last post by:
Just out of curiousity, what are the deficiencies you've found with the new xsdobjectgen tool?
3
4448
by: Bobby | last post by:
I have a schema and have used XSDObjectGen.exe to create a set of classes that represent the schema. What is the best way to fill xsdobjectgen.exe generated classes with data? I want to create and serialize an instance of one of the classes in this schema. the class is declared publicly, but isn't accessible outside the namespace: ...
2
2231
by: Peter Bates | last post by:
Hi, I'm just getting used to XSDObjectGen and i have the following question. Can i use a class inherited from a class generated by XSDObjectGen with XmlSerialize? Specifically, I have many xml files arriving from a PC inventory scanner we use. I wish to deserialize them and then process them.
0
1837
by: Pascal Brunot | last post by:
Hi, Running XSDObjectGen (1.4.1.0) on the following Infopath-generated XSD gives an "unexpected error": "Event register full" during generation (exact english error message may differ, i am using the italian version). VS.net 2003 accepts the XSD. The strange thing is that I managed using XSDObjectGen on much more
0
1479
by: Andrew Burgher | last post by:
Feeding the following .xsd into the XsdObjectGen (v1.4.2.0) tool produces an invalid attribute: with DataType="System.String". Has anybody seen this behaviour before? Is this a bug in XsdObjectGen? or a problem with the input schema? I'm trying to avoid hacking the generated code... In: <?xml version = "1.0" encoding = "UTF-8"?> <xsd:schema elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
0
2989
by: Jeff Killberg | last post by:
I am working on a .NET 2.0 project where we will be defining a large object model in XML schema and generating the C# code to process XML documents conforming to this XML schema into the object model. On a similar project, we used XsdObjectGen.exe. I am trying to determine if there are major enough reasons to use XsdObjectGen or if the .NET 2.0 version of Xsd.exe will suffice. Our XML schema will be defined using a fairly minimal set...
2
4126
by: olympus_mons | last post by:
Hi, I'm just discovering the power of xsd.exe, so maybe I'm doing something wrong. schema files describing requests and responses. So there is an extra xsd file for each response and each request as well as some base schemas, i.e. defining a data type for a result element. Among others this result element contains a simple enumeration type "ResultState" which can either be "OK" or "FAILED".
1
4344
by: Veerle | last post by:
Hi, I am experiencing a lot of problems with XsdObjectGen. I downloaded the latest version from http://www.microsoft.com/downloads/details.aspx?FamilyID=89e6b1e5-f66c-4a4d-933b-46222bb01eb0&DisplayLang=en but this is dated september 2006, so it's not very recent. We receive xsds from a third party and our application has to generate xml that is valid for these xsds. This makes that we cannot alter the xsds in any way, we have to...
0
8600
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9021
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8892
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8860
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7712
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4361
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4614
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3038
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.