473,890 Members | 1,178 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XML Structure serialized in Disk for a dataset

I have used the wizard of VisualStudio to generate a DataSet (typed
dataSet).
I need to have the structure serialized in XML in a nested way and not in a
table representation

e.g:
I have 3 tables: Companies- Departments- Employees
A company can have n Departments and a Department can have m employees

By default the DataSet is serialized this way:
<Companies>
....
</Companies>
<Companies>
....
</Companies>
<Companies>
....
</Companies>
<Departments>
....
</Departments>
<Departments>
....
</Departments>
<Employees>
....
</Employees>
<Employees>
....
</Employees>

I need it to be serialized this way (nested):
<Companies>
<Departments>
<Employees>
</Employees>
<Employees>
</Employees>
</Departments>
<Departments>
<Employees>
</Employees>
<Employees>
</Employees>
</Departments>
</Companies>
This will also imply that the "foreign keys" WILL NOT be stored in the XML
since they are not required in the target XML structure.

In the MSDN, I have seen that the DataRelation class provides a Nested
property that could be used. However, it does not remove the foreign keys.
Furthermore, modifying this property (on the relation) in the Graphic tool
provided by VS does not really work

Thaaaaaaaanks,
José
Jul 21 '05 #1
0 1197

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

Similar topics

3
387
by: Douglas Buchanan | last post by:
Newbie to donnet This is an example of a structure given in vs.net help ============================ Private Structure Employee Public GivenName As String ' This employee's given name. Public FamilyName As String ' This employee's family name. Public Extension As Long ' This employee's telephone extension. Private Salary As Decimal ' This employee's annual salary.
2
1418
by: kevininstructor | last post by:
I created two classes called "site" and "Sites" which use 'BinaryFormatter' to load and save class information to a disk file. In my test application all works fine but when implementing into another application the code fails with a message indicating there is a missing assembly. The missing assembly is the project which serialized the class information to disk e.g. Test1a, created binary files DDEP attempted to read them but error...
5
4815
by: Alfonso Morra | last post by:
Hi, I am writing a messaging library which will allow me to send a generic message structure with custom "payloads". In many cases, a message must store a non-linear data structure (i.e. "payload") using pointers. Examples of these are binary trees, hash tables etc. Thus, the message itself contains only a pointer to the actual data. When the message is sent to the same processor, these pointers point to the original locations, which...
0
982
by: José Joye | last post by:
I have used the wizard of VisualStudio to generate a DataSet (typed dataSet). I need to have the structure serialized in XML in a nested way and not in a table representation e.g: I have 3 tables: Companies- Departments- Employees A company can have n Departments and a Department can have m employees By default the DataSet is serialized this way:
4
1267
by: Bill | last post by:
I have a DataSet that is serialized to a local disk. One of the testers recently experienced a problem where data was saved and the Tablet PC she was testing later went offline. When she restarted the system, the XML DataSet appears to have been corrupted and the application is generating an error "This is an unexpected token. The expected token is 'EndElement', line 26680, position 24." She has not returned the Tablet, so I haven't had...
3
10812
by: ~~~ .NET Ed ~~~ | last post by:
Hello, I am having a problem trying to serialize this simple structure, I use it in a collection class that derives from CollectionBase but I noticed that at least for now the serialization exception ocurrs when i try to serialize this structure (see below). The idea is that it would be serialized to: < Param type="..." method="Get" required="true">something</Param>
5
1266
by: Ben Kim | last post by:
Hello all, We are diving into VB.NET 2005 head first, coming from a language called Clarion. What are some of the drawbacks, if any, to serialized objects? Should we just use streaming data? The environment will be as follows: Multiple data stores (could be SQL Server databases across LAN, WAN, internet... could be a mainframe system) These disparate result sets will be combined into a single return When returned to the requestor,...
3
2275
by: gezerpunta | last post by:
hi I need to calculate the size of serialized data in db for my quota operation.How can I find it ?
3
1584
by: =?Utf-8?B?TWFydGluIEtvY2g=?= | last post by:
1st I serialize a DataSet (contains 14 DataTables) into file, with BinaryFormatter. 2nd I change some columns in a DataTable. 3rd When I now Deserialize the DataSet from bin file got I problems ?? Thanks in advance
0
9820
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
11225
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
10811
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
10920
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
9626
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...
0
6041
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4675
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
4270
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3276
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.