473,471 Members | 4,616 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

xsd questions (xsd to classes)

Hi,
I have some questions regarding to use vs.net to generate xsd from database tables then generate classes, not typed datasets, from the xsd.

Basically I want to have some light-weigh classes to represent the database tables/views (I know tables/view are not business entities, but this is a good starting point and i am lazy =) Here are what I did:

- used xsd.exe to generate business entities, which will be used to be passed between layers, based on the xsd files.
- created the xsd file by creating an new XML schema item, then dragging the tables from server explorer then dropping to the vs.net designer.
- I don't need typed datasets for these business entities, I only need simple classes to represent the business entities so I use the /classes switch when running the xsd and I create an external tool entry for xsd.exe by passing the ItemFileName and ItemExt as arguments to automate this process.

Here are my questions:
1. vs.net designer always creates document root when I drag&drop the tables into designer. Is there any way that I can exclude the root document from being generated as a class? Is there any way the change this behavior of vs.net designer?

2. vs.net appends the parent node name to the subnodes. Is there a way to change this behavior?

3. xsd.exe appends the root document as prefix to all the classes associated with. How can I prevent xsd.exe appending the prefix to the generated classes?

4. is there a detail article about how to create class from xsd using xsd.exe and vs.net designer?

5. I understand codegen annotations can be used for generating typed dataset, any thing i can do use annotation

thanks in advance

ILN
Nov 11 '05 #1
1 3237
Please see my reply in microsoft.public.vsnet.general.

Thanks,

Luke
Microsoft Online Partner Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 11 '05 #2

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

Similar topics

0
by: Koen Appeltans | last post by:
Hi, I'm having a problem with the xsd-tool from the dotNet framework. We use this tool to generate vb-classes of our xsd's. The problem is that we do a lot of includes in our xsd's of our...
5
by: Paw Pedersen | last post by:
Is it possible to load a XSD and loop throw the nodes and attributes that you whant filled out, and then generate a XML instance with the trees and data that you have filled data in? And how do...
2
by: farseer | last post by:
Hi, First, sorry for this long post, but i'd like to explain my problem in detail... i have generated some classes from my schema. Classes are generated for the root (overall document),...
2
by: Chris Smedley | last post by:
I am attempt to perform something that I thought should be quite simple... I want to take the VoiceXML 2.0 or VoiceXML 2.1 XSD definitions and create classes. It appears that a number of items...
1
by: robc | last post by:
Hi, I am using the xsd.exe tool (in .NET 2.0) to generate C# classes from a set of schemas. Some of the XML types that I have defined are used by more than one schema. For maintenance...
1
by: Martin Z | last post by:
I'm getting acquainted with the whole XML/XSD thing, and I've run into a wall. I have a tree of objects that I deserialize from XML for configuration reasons. I have generated XSD from the...
3
by: umer riaz | last post by:
Hi, I am trying to create a cs classes from an imported scheme, specifically the OTA (open travel alliance) The schemas use <xs:union> in the base include file OTA_SimpleTypes.xsd In addition...
4
by: BorisBoshond | last post by:
Hi all, Hope someone is able and willing to help me with following problem. I received a xsd file from another company, our company i supposed to return xml based on that xsd. Problem is that I...
2
by: Roy Chastain | last post by:
I have some 'base' schema definitions that are going to be in several projects in the future. The processing of resulting classes created by XSD will be consistent across the new projects. I...
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
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...
0
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...
0
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,...
0
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.