473,663 Members | 2,705 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XML generated from a Dataset with a Relationship established

Me
Hi,

I have a dataset with two tables (Order, Item) and a
relationship setup to join the tables. I have the nested
property of the DataRelation class set to true. When I
use the GetXML method the XML looks like this:

<Orders>
<Order>
<OrderID>1</OrderID>
<Item>
<ItemID>1</ItemID>
</Item>
<Item>
<ItemID>2</ItemID>
</Item>
</Order>
</Orders>

But the XML I want it to produce would lokk like this:

<Orders>
<Order>
<OrderID>1</OrderID>
<Items>
<Item>
<ItemID>1</ItemID>
</Item>
<Item>
<ItemID>2</ItemID>
</Item>
</Items>
</Order>
</Orders>

Is there way to force the Dataset to give me the XML with
the <Items> and </Items> tags using the GetXML method? If
not, how would I go about generating the XML the way I
want it? I don't have to traverse the Dataset and
generate it myself do I?
..
Nov 11 '05 #1
0 1183

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

Similar topics

4
1544
by: H Cohen | last post by:
Hi, I have a corporate database with about 60 different tables that spans manufacturing, accounting, marketing, etc. It is possible, but unwieldy, to establish a relationship for each table in the entire database through critical fields like customer_id or product_id. But should I do that?
7
354
by: Richard Myers | last post by:
Hello. I am getting an InvalidCastException which has revealed yet more of my ignorance. I cant believe i dont already know this and haven't encountered it before until now. I am consuming a dataset from a webservice. I wrote both the server and client apps and the both use the same middle teir. I fill a dataset on the server that has a relationship between two of the tables inside. The relationship is between two strongly typed tables...
2
9952
by: Wayne Wengert | last post by:
I am attempting to generate an XML file based on the contents of a dataset which contains a parent-child relationship but when I create the output file all I get is the XML header as shown here: <?xml version="1.0" encoding="utf-8"?> <DataSet xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" /> I know the dataset and the relationship is OK as I have the dataset bound to...
2
3413
by: Larry R Harrison Jr | last post by:
I have an Access 97 database with 2 tables that have a one-many relationship. I have a SQL statement in the "one" table which I want to execute and insert 7 records into the "many" table, and I want them to be linked to the "main" table. Problem is, it won't let me run the SQL run as long as the one-many relationship is established in the relationship window. The SQL is:
0
1283
by: Joey Lee | last post by:
Hi, I have created a dataset schema(*.xsd) which contain two element "InvoiceHeader" and "InvoiceDetail". I set the primary key of both the element. for example "InvoiceHeader" -> id and "InvoiceDetail" -> "id, date" Then I created a relationship between both these item using the key "id". This create the one-to-many relationship.
0
952
by: Danny Tuppeny | last post by:
/* * Not sure which group has the best audience for this question, * but followups are set to microsoft.public.dotnet.framework */ Hi all, In Visual Web Developer Express, I've created a new database with a table called Tag. It has three fields, ID, ParentID and Name. ID is a Primary Key, and there's a relationship between ID/ParentID to allow a
6
463
by: Joseph | last post by:
Is it possible to create a dataset in one form of a Win app and use that same dataset in a second form of the same app? If so, how? Thanks.
1
1245
by: MRW | last post by:
Hello! I'm trying to create a dataset with a relationship inside a class, so it can be used on multiple pages. If I create the dataset in the class and define the relationship in the page, it works perfectly. If I create the relationship in the class itself, it doesn't work. The only thing I can think of is that on the page I declare the
6
4052
by: NicoleCartrette | last post by:
Going back to school is easier said than done.. This was posted to an older thread earlier but I don't think it got any attention. Your help is appreciated Professor requires we create a simple database and specified what are to be the primary keys and relationships etc. I have created the four tables and established the neccessary one to many and many to one relationships between primary keys in the tables with the exception of one...
0
8857
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...
0
8768
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8547
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
8633
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...
0
7368
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6186
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
4181
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
2763
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
1754
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.