Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / XML / February 2008

Tip: Looking for answers? Try searching our database.

Create tables from xsd

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jerry C - 19 Feb 2008 12:23 GMT
I have some xsd files and I want to create tables from them. Is there a
utility to do this. I have used the xsd.exe to create the classes from the
xsd files and that worked. I am new to xml programming.

Thank you
Signature

Jerry

Martin Honnen - 19 Feb 2008 13:15 GMT
> I have some xsd files and I want to create tables from them. Is there a
> utility to do this. I have used the xsd.exe to create the classes from the
> xsd files and that worked. I am new to xml programming.

Do you want to create data base tables? If so which data base management
system do you target?
Within the .NET framework class library there is the DataSet object
which has a method ReadXmlSchema
<URL:http://msdn2.microsoft.com/en-us/library/system.data.dataset.readxmlschema.aspx>
to define a DataSet structure based on an XSD schema.

Signature

    Martin Honnen --- MVP XML
    http://JavaScript.FAQTs.com/

Jerry C - 20 Feb 2008 00:15 GMT
Thank you,

I will be using Microsoft SQL Server 2005

Jerry

> > I have some xsd files and I want to create tables from them. Is there a
> > utility to do this. I have used the xsd.exe to create the classes from the
[quoted text clipped - 6 lines]
> <URL:http://msdn2.microsoft.com/en-us/library/system.data.dataset.readxmlschema.aspx>
> to define a DataSet structure based on an XSD schema.
Steven Cheng - 20 Feb 2008 03:59 GMT
Hi Jerry,

As for XML schema, if you want to generate physical tables in DBMS
system(such as SQL Server 2005), I'm afraid .net framework haven't built-in
component or classes that can help do such direct convertion. Such task is
mostly restricted by the DBMS side.

For .NET data access classes such as DataSet, DataTables, I think you can
also use the xsd.exe tool to generate them from a given XML schem:

#XML Schema Definition Tool (Xsd.exe)
http://msdn2.microsoft.com/en-us/library/x6c1kb0s(VS.71).aspx

In the document, you can find that the xsd.exe has an command option called
"/d" which means the classes you want to generate is not normal custom
classes, but DataSet/DataTable classes.  You can try it for your XML
schemas:

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.



Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================
   

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
>From: =?Utf-8?B?SmVycnkgQw==?= <jerryed@nospam.nospam>
>References:  <EBEFD43F-7BFC-4985-A2BE-443ADBF044FB@microsoft.com>
<OT5kLmvcIHA.148@TK2MSFTNGP04.phx.gbl>
>Subject: Re: Create tables from xsd
>Date: Tue, 19 Feb 2008 16:15:00 -0800

>Thank you,
>
[quoted text clipped - 10 lines]
>> Within the .NET framework class library there is the DataSet object
>> which has a method ReadXmlSchema

<URL:http://msdn2.microsoft.com/en-us/library/system.data.dataset.readxmlsch
ema.aspx>
>> to define a DataSet structure based on an XSD schema.
Jerry C - 21 Feb 2008 22:58 GMT
Steven,

Thank you for your reply,

I have used the /d and xsd.exe will not create datasets. I think this file
only creates classes. I will post another question obout how to use these
classes.

Thank you,
Signature

Jerry

> Hi Jerry,
>
[quoted text clipped - 74 lines]
> ema.aspx>
> >> to define a DataSet structure based on an XSD schema.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.