473,388 Members | 1,352 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Problems with XsdObjectGen

Hi,

I am experiencing a lot of problems with XsdObjectGen. I downloaded
the latest version from
http://www.microsoft.com/downloads/d...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 generate code for them as they are. The
xsds are also quite complicated, a lot of includes of other xsd files
in each xsd. Also some circular references, which makes that we cannot
use XSD.exe which is an alternative for XmlObjectGen.

My problems:
- Sometimes enums and classes with the same name are generated, but
this isn't allowed in C# (not in the same namespace, which is the
case). An easy solution would be if I could prefix all generated enums
with a string of my choice, but this seems not te be supported.
- Sometimes classes and properties within these classes are generated
with the same name. But C# doesn't allow a property to have the same
name as the class name. An easy solution again would be if I could
prefix or subfix the generated class names or property names, but
again this doens't seem to be supported.
- If there are two enums or two classes with the same name, the second
class or enum name is subfixed with "2", eg: Person and Person2. In
other classes, where these enums or classes are you used, it sometimes
mixes them up and declares a property as Person instead of Person2.

Anyone having the same problems? What do you do about them (we correct
them manually each time, but this takes like 5 minutes each time we
regenerate).

Anyone knowing a better tool than XsdObjectGen and xsd.exe?

Veerle

Mar 26 '07 #1
1 4320
Have you taken a look at the LINQ to XSD preview? Using Linq To XSD, you can
generate classes from the schema (these classes work on top of an in-memory
xml tree) . To generate the xml, your application should set the properties
on these classes with the appropriate values.
More information is available at:
http://blogs.msdn.com/xmlteam/archiv...e-to-linq.aspx

Thanks,
Priya

"Veerle" <ve*********@hotmail.comwrote in message
news:11**********************@p77g2000hsh.googlegr oups.com...
Hi,

I am experiencing a lot of problems with XsdObjectGen. I downloaded
the latest version from
http://www.microsoft.com/downloads/d...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 generate code for them as they are. The
xsds are also quite complicated, a lot of includes of other xsd files
in each xsd. Also some circular references, which makes that we cannot
use XSD.exe which is an alternative for XmlObjectGen.

My problems:
- Sometimes enums and classes with the same name are generated, but
this isn't allowed in C# (not in the same namespace, which is the
case). An easy solution would be if I could prefix all generated enums
with a string of my choice, but this seems not te be supported.
- Sometimes classes and properties within these classes are generated
with the same name. But C# doesn't allow a property to have the same
name as the class name. An easy solution again would be if I could
prefix or subfix the generated class names or property names, but
again this doens't seem to be supported.
- If there are two enums or two classes with the same name, the second
class or enum name is subfixed with "2", eg: Person and Person2. In
other classes, where these enums or classes are you used, it sometimes
mixes them up and declares a property as Person instead of Person2.

Anyone having the same problems? What do you do about them (we correct
them manually each time, but this takes like 5 minutes each time we
regenerate).

Anyone knowing a better tool than XsdObjectGen and xsd.exe?

Veerle

Mar 29 '07 #2

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

Similar topics

0
by: Burak | last post by:
Hello, I am working on a VB.NET web service that will be used to send and receive job openings. I would like to use their "industry standard" xsd file ...
2
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...
5
by: colinco | last post by:
Just out of curiousity, what are the deficiencies you've found with the new xsdobjectgen tool?
3
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...
3
by: Edward Clements | last post by:
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...
2
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...
0
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...
0
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...
0
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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...
0
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...

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.