Generate typed DataSet from XML or create typed DataSet from xsd?

Hi,

I can easily create an xsd from an xml file in Visual Studio 2005. But
I want a typed DataSet, so is there an option to create that typed
DataSet from the xsd or the xml file? I need many such typed DataSets
so I don't want to create them from scratch.

On a sidenote: I am loading the XML from http, I transform it via xslt
and then load the result into a typed DataSet. I think I am doing a
lot of inefficient things. I am always having trouble with "how to get
a reader / writer here" and "what to pass to this readxml there" so I
end up reading stuff into stringbuilders and streams and so on and on.
The Xml classes are very complex and I don't use them that often.
Maybe just coincidentally somebody has an example for this scenario...

TIA for any hints,
Regards
DC

0
dc8304 (17)
8/24/2007 3:51:01 PM
dotnet.xml 7266 articles. 0 followers. Follow

2 Replies
654 Views

Similar Articles

[PageSpeed] 48

DC wrote:

> I can easily create an xsd from an xml file in Visual Studio 2005. But
> I want a typed DataSet, so is there an option to create that typed
> DataSet from the xsd or the xml file? I need many such typed DataSets
> so I don't want to create them from scratch.

The xsd.exe tool, part of the .NET framework SDK, can create typed 
datasets from xsd schemas using e.g.
   xsd.exe schema.xsd /dataset
see <URL:http://msdn2.microsoft.com/en-us/library/x6c1kb0s(VS.80).aspx>

-- 

	Martin Honnen --- MVP XML
	http://JavaScript.FAQTs.com/
0
mahotrash (1778)
8/24/2007 4:16:04 PM
On 24 Aug., 18:16, Martin Honnen <mahotr...@yahoo.de> wrote:
> DC wrote:
> > I can easily create an xsd from an xml file in Visual Studio 2005. But
> > I want a typed DataSet, so is there an option to create that typed
> > DataSet from the xsd or the xml file? I need many such typed DataSets
> > so I don't want to create them from scratch.
>
> The xsd.exe tool, part of the .NET framework SDK, can create typed
> datasets from xsd schemas using e.g.
>    xsd.exe schema.xsd /dataset
> see <URL:http://msdn2.microsoft.com/en-us/library/x6c1kb0s(VS.80).aspx>
>
> --
>
>         Martin Honnen --- MVP XML
>        http://JavaScript.FAQTs.com/

Thank you Martin, that works exactly as I was hoping.

Regards
DC

0
dc8304 (17)
8/27/2007 4:53:54 PM
Reply:

Similar Artilces:

No creating or forwarding email!!
Every time I try to forward a message or create an new email Outlook freezes (Office XP w/ SP2)If I try to open an attached office doc the same thing happens. Outlook is trying call on different components of office and fails each time. What gives? A corrupt dll? A Detect and Repair would be the first I would try (from the Help Menu) you will need an install media/point "DaveP" <anonymous@discussions.microsoft.com> wrote in message news:1378301c3f7f3$008cd8d0$a301280a@phx.gbl... > Every time I try to forward a message or create an new > email Outlook freezes (Office ...

ExcelReport
Please access http://www.ljzsoft.com ExcelReport is a report generator to generate reports in Microsoft Excel format. If you know how to use Excel and write SQL statements, you can use ExcelReport to create all kinds of reports as you need. Furthermore, with one time configuration, you can easily build periodic reports such as daily, weekly, monthly and annual reports. ...

Dynamically generating email as html from a template
Would anyone know of an article/information detailing the creation of templates in word that can be used to create word documents by merging data to be saved as html to be included as the body of an email in outlook. .... or another method of dynamically creating emails in outlook based on a template. Thanx for the Advice Have you looked at Word's mail merge feature? That's exactly what it = does. See http://www.slipstick.com/contacts/startletter.htm=20 --=20 Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming - Jumpstart for=20 Administrators, Power Us...

How to create CDialog from different DLL?
Hello, I’m trying to create a CDialog object, which is defined in one DLL from a class in another DLL. The dialog appears to be successfully created but its handle is invalid, when I’m trying to use "this" the application crashes with a debug assertion at wincore.cpp "LookupPermanent". Do you have any suggestion how to solve this problem? Thanks, Limor If it was successfully created, you would have a valid handle of the dialog. I suspect that it was not created successfully because the resource for the dialog was not found. What type of DLL are you using. If its an...

When I type in 0 A to a cell it returns 12:00 AM. Need to turn off
When I type 0 A in to a cell it automatically returns 12:00 AM. I have looked through all of the formatting functions and cannot turn it off. This is not a function you can turn on and off. It is a matter of cell formatting (it's one of Excel's Time formats). Switch your cell formatting to "Text" or, if you need to keep the current formatting, precede the 0 with a single apostrophe('). "Dazza" wrote: > When I type 0 A in to a cell it automatically returns 12:00 AM. I have looked > through all of the formatting functions and cannot turn it off. C...

Preventive Maintenance, multiple call generation 1 generate to pr.
need to be able to have preventive maintenance generate a call for each day in a month when running the generate routine. Rather than having to create each one individually. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/Businesssolutions/...

Error Generating the Offlice Address Book
I have a mixed site with 3 5.5 server and 4 2003 servers. I installed 2003 SP1 a few weeks back and since then I'm having an issue generating my Offline Address Book. Here the event log messages I'm getting. Event ID 9331: OALGen encountered error 80040107 (internal ID 501023d) accessing the public folder store while generating the offline address list for address list '/'. - Default Offline Address List For more information, click http://www.microsoft.com/contentredirect.asp. Event ID 9335: OALGen encountered error 80040107 while cleaning the offline address list public ...

.net code to compare 2 xml documents
I've looked at XmlDiff, but can't use its output in my case. Therefore i'm looking for an alternative. I need at piece of code that can take 2 xml documents and tell me the differnces. Any ideas? Hi Rasmus, I searched through the web, however, I didn't find any other xml comparing tool better than XmlDiff. I think it is a complicated process to compare two XmlDocuments. This cannot be achieved by a simple piece of code. As far as I can see, XmlDiff patch provides us with a good solution of comparing Xml documents. And it is an open source one. I think you can try to...

PROVEN SYSTEM TO GENERATE CASH
Hi friends, I think it be a very promising program .... the great thing about it is they market it for you! Easy, once you join all of this happens without you lifting a finger! You automatically received your replicated Unique URL (personal web site) You automatically have 150,000+ emails sent to promote your web site You automatically have people (just like you) visit your web site You automatically have welcome emails sent to your new prospects You automatically have 10 days of follow-up (drip) emails sent to your new prospects The System automatically processes the new member when they...

vs2005 xsd.exe: Can it generate different files?
Is there an option to get the vs2005 xsd.exe tool to generate seperate files for each class that it generates? It would be much easier from a maintenance standpoint than one big giant file for my classes. Thanks for any help Matt MattBell wrote: > Is there an option to get the vs2005 xsd.exe tool to generate seperate files > for each class that it generates? I had a look at the output of xsd.exe /help but there is no option/setting mentioned. -- Martin Honnen --- MVP XML http://JavaScript.FAQTs.com/ ...

Auto-generate product ID
Is there a way to auto-generate product ID? Or is there any third party addons that does that? Better yet would be a way to auto-generate a barcode for each item "Raymond" <Raymond@discussions.microsoft.com> wrote in message news:F1EF7ACB-8D15-4527-A8C7-53C9F8FD6906@microsoft.com... > Is there a way to auto-generate product ID? Or is there any third party > addons that does that? Raymond, We offer AutoGen for this purpose. Barcode 128A is the default for new item adds. For more information contact your RMS reseller or visit: http://www.digitalretailer.com/rmsaddin...

Dlookup Problem Text VS Number type
Hello all- I have a form (in access) that has a section of code which fills in certain cells for an excel spread sheet. Code has worked perfectly for a while, but recently I changed the table's 'OrderNumber' field from a Number type to a Text type. Now my Dlookup doesn't work. I tried changing it back, and it works again. Why does it matter? I need/would really like it to be a text type field. All help/explinations would help a lot. Thanks! Zach Zach - Did you also update the DLookup statement? A text field requires the single-quote delimiter arou...

to generate only table names but not their schema in the database
My replication on multiple servers failed. So i want to know which articles are published from the daabase. i wish to generate only articles that are there in the database, but not their schema or column names. how to do this through ms visio ...

How to remove xmlns attribute from XML document (.net)
I am relatively new to XML and C#. So, forgive me if this question is too newbie. :-) While assuming this is an easy programming task, I couldn't find a single reference anywhere for how to do it. Here is the situation: I am given an XML file like the one below from other group in my company to load the data into our database. <root xmlns="the-namespace"> .... data here... .... </root> The particular namespace may mean something to the people who generate the xml data schema and data files but nothing to us. Here is my code (we have a schema and a data files ...

Auto Generate Serial Numbers for Bill of Materials
Hi! We have a partner in Australia who has some issues with the Serial Number Masks for Finished Goods in Inventory. Currently Bill of Materials functions this way: If the customer creates 20 finished products which tracks Serial Numbers. The user has to manually enter the 20 serial numbers into Assembly Entry. Even though the Finished product has been setup with a Serial Mask, there is no option to Auto Generate Serial Numbers. He would like to suggest that there should be an auto generate serial number function also for the finished goods in Bill of Materials. Thanks, ---------...

A budget where receipts are typed in under categories and added f.
We are looking for a budget program where there are categories such as food where you type in individual receipts and it totals it for you so we can keep track of how much we spend and on what in the overall budget. You can use a program such as Microsoft Money that's designed to keep track of income and expenses. Or, you can enter the data in a list in Excel, then summarize the data using a pivot table. For example, with a list like this: Date Item Category Amount 1/1/05 Groceries Food $25.00 1/1/05 Gas Car $30.00 you could create a pivot table that su...

Yes/No Data Type
I have a field with a Yes/No data type that uses a field with a check box on my form. How do I designing a query to show all records with check mark or all records without check mark? I've tried Is Null in criteria field and Is Not Null but this does not work for this type field. Any idea on how to do this type query? -- FL On Thu, 21 Jun 2007 16:33:01 -0700, FL wrote: > I have a field with a Yes/No data type that uses a field with a check box on > my form. How do I designing a query to show all records with check mark or > all records without check mark? I've tr...

how to generate a range of number
Howdy folks, I would like to know how to generate a range of number (for example: 10000 to 19999) in excel without typing them in each number into each cell one by one. Your help would boot up my business significantly. Gracias, Vito Corleone, President Check out the Edit|Fill, Series options. If you want the numbers to go down a column, make sure you click the Columns choice. tj "Vito Corleone" wrote: > Howdy folks, > > I would like to know how to generate a range of number > (for example: 10000 to 19999) in excel without typing them > in each number int...

creating my sp_help
Hello there the original sp_help and sp_helptext works directly only on objects without schema. after i add schema i have to set sp_help 'scm.obj' I took the original code of sp_help, change it so it will be in use for schema objects and tried to compile it. It gave me an error because it not found TypePropertyEx what is this and how can i use it? On Wed, 14 Jul 2010 12:44:41 +0300, "Roy Goldhammer" <royg@yahoo.com> wrote: >Hello there > >the original sp_help and sp_helptext works directly only on objects without >schema. after...

Create and assign an outlook task using VBA?
I have code that creates an Outlook task for me. I want to be able to automatically assign a task to a certain e-mail address recipient. Is this possible? It seems that the right properties are available, but I can't seem to get it to work. Here is my code... Private Sub Create_It_Click() 'Create the Task in Outlook On Error GoTo AddAppt_Err Dim outobj As Outlook.Application Dim outtask As Outlook.TaskItem 'Dim objApptOccur As TaskItem Set outobj = CreateObject("outlook.application") Set outtask = outobj.CreateItem(olTas...

Parse Xml Schema
I have a Xml schema like the this: .... <schema xmlns = "http://www.w3.org/2001/XMLSchema" targetNamespace = "http://www.ipdr.org/namespaces/ipdr" xmlns:ipdr = "http://www.ipdr.org/namespaces/ipdr" version = "3.0" elementFormDefault = "qualified" attributeFormDefault = "unqualified"> <include schemaLocation = "IPDRDoc3.0.xsd"/> <element name = "day" type = "string"/> <element name = "size" type = "int"/> <complexType name = "IPDR-TEST-Type&qu...

what type of variable is this?
I am currently writing code in my Worksheet_Change() as follows: Private Sub Worksheet_Change (ByVal Target as Range) For Each t in Target ' Do stuff Next End Sub If I decide to use "Option Explicit" in this module, I believe that the compiler will ask me to declare the variable "t" above. What type should I declare "t"?? Should it be "Dim t as Range"??? or "Dim t as Variant"??? or something else? thank u You would Dim it as a Range. -- Rick (MVP - Excel) "Robert Crandal&quo...

Create window that always stays as taskbar button
Hi, I'd like to create an extra window from my application that has a taskbar button always stays in the taskbar. So i derived a class from CFrameWnd and create it with WS_EX_APPWINDOW style However, the problem is the extra new window will become hidden and disappeared from taskbar when my main application window is being minimized. It appears on taskbar again only when the main app's windows is being restored or shown. How could i prevent the extra windows from being disappeared from the taskbar button? Please kindly advise. thank you very much Jeffrey when you stay taskbar bu...

File-list generated from folder including attributes
Hey guys My macro generates a file-name list with accordingly attributes as "size", "Accessed date". My problem is to expand this Explorer-information with attributes: "Author" and "Owner". I dont know/cantv find the code...... maybe file.author or something????+ Here is my macro: Sub SelectFiles(ByVal sPath) '----------------------------------------------------------------------- Dim fldr As Object Dim Folder As Object Dim file As Object Dim Files As Object Set Folder = FSO.GetFolder(sPath) Set Files = Folder.Files...

I type a date (1/05) in a cell, press enter, it reads ####.Why?
I'm entering data inMicrosoft Excel and am fairly new to Excel. I'm entering dates in cells in a worksheet and typred in a date and pressed enter and all it will do is read #####. Why does it do this and how do I get the computer to recognise the actual numbers of the date I entered? erg Probably the cell is not wide enough. -- Kind regards, Niek Otten Microsoft MVP - Excel "KIWI" <KIWI@discussions.microsoft.com> wrote in message news:D1F07478-F035-4DDF-8F77-5FC5A070155F@microsoft.com... | I'm entering data inMicrosoft Excel and am fairly new to Excel. I...