473,664 Members | 2,759 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

DC
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

Aug 24 '07 #1
2 10610
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/
Aug 24 '07 #2
DC
On 24 Aug., 18:16, Martin Honnen <mahotr...@yaho o.dewrote:
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

Aug 27 '07 #3

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

Similar topics

0
1691
by: Natehop | last post by:
I've been attempting to design an n-tiered framework leveraging .NET's strongly typed Dataset. My Framework will serve as the foundation to several client apps from Windows applications to web sites and web services. The architecture consists of a business rules tier, a data tier, and a common tier. The common tier contains my typed Datasets while the business rules and data tiers contain functions to populate and save the common...
2
4373
by: David | last post by:
I have been developing applications with Java for quite a while but I am new to .NET development. I am trying to learn the ".NET way" of creating Strongly Typed Objects from a database. The Enterprise Library seems pretty close to what I am used to in Java but I am not sure how to create strongly-typed DataSets. I see that I can use the LoadDataSet method from a Microsoft.Practices.EnterpriseLibrary.Data.Database but I am not clear on how...
1
1243
by: Trond | last post by:
I have a class MessageController that has a method GetMessagesDataset that connects to a database SPROC. When done it returns a dataset. Then in my ASP.NET for i do this: msgController = new MessagesController(); DataSet dsMessages = new Dataset(); dsMessages = msgController.GetMessagesDataset();
1
287
by: Mythran | last post by:
Which would be the better solution? 1.) 20 Tables In 1 DataSet, no relationships. 2.) 20 DataSet's with 1 Table each. The tables have no relationship with each other (although they represent data retrieved from normalized databases, they are normalized themselves. Basically, if I have 20 tables in a single typed dataset, and I create the
3
2433
by: Chris Thunell | last post by:
I have 2 forms, on 1 form i use the wizards to create a strong typed dataset with tables from an SQL database... and from that i can do stuff like: me.daEmployee.fill(me.dataset11.tblEmployee) plus some 3rd party controls can see it the datatables etc etc. Is there anyway when i open the second form that this information that has already been loaded into my in-memory dataset be available on all my other forms... and still be strong...
21
2417
by: Peter Bradley | last post by:
Hi all, This post is sort of tangentially related to my earlier posts on configuration files for DLLs. Does anyone know how to create typed DataSets using VS2005's new DataSet designer, but with the ability to configure the connection string via a config file? The designer seems to hard-code the connection string into the dataset itself, which just can't be right.
0
1317
by: =?Utf-8?B?UGV0ZXI=?= | last post by:
Based on what I have read, I think I need to do the followings: 1. DataSet.WriteXmlSchema 2. Xsd.exe I assume this will work but I wonder how to generate strongly typed dataset from untyped dataset durning runtime.
4
4451
by: newtonwong | last post by:
I have a web reference WSDL, but it doesn't really create an XSD. I'm trying to generate datasets from the WSDL file but not sure how to do so. I successfully created the proxy class, but the WebServices all return/ send domain typed data, so I am seeing if I can turn these "classes"/ WSDL into Typed DataSets. Anyone have ideas on where to start?
1
2216
by: ergolargo | last post by:
Hello all Apologies if I've picked the wrong forum, but can anybody offer assistance to me? I'm definitely struggling to get my first data access layer generated using the Dataset Designer in Visual Studio 2005. I just can't believe how difficult the process of generating a class library DLL from an XSD file is proving to be, I'm sure I'm not trying to do anything fancy, it seems like it should be very basic functionality to me, so I must be...
0
8438
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8348
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
8863
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8549
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
8636
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...
1
6187
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4186
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...
1
2765
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
2
2004
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.