PC Review


Reply
Thread Tools Rate Thread

DataSet: Nested Tables in XML

 
 
Frank Uray
Guest
Posts: n/a
 
      28th Oct 2008
Hi all

I got some trouble with creating XML Files.

I have a DataSet with two tables (Calendar and holidays)
and a Relationship (Nested = true) between both tables ("name").

When I now write the XML I get:
<Static>
<Calendar>
<name>AED</name>
<holidays>
<name>AED</name>
<holiday>2008-12-08</holiday>
</holidays>
<holidays>
<name>AED</name>
<holiday>2008-12-10</holiday>
</holidays>
</Calendar>
</Static>

What I need is this:
<Static>
<Calendar>
<name>AED</name>
<holidays>
<holiday>2008-12-08</holiday>
<holiday>2008-12-10</holiday>
</holidays>
</Calendar>
</Static>

Does anybody knows how this can be done ??

Thanks a lot for any comments.

Best regards
Frank

 
Reply With Quote
 
 
 
 
sloan
Guest
Posts: n/a
 
      28th Oct 2008
DataSet xml is best used with relational tables...and not nesting.

You can use this trick if necessary:

http://sholliday.spaces.live.com/Blog/cns!A68482B9628A842A!148.entry




"Frank Uray" <(E-Mail Removed)> wrote in message
news:01343959-1765-44D8-B263-(E-Mail Removed)...
> Hi all
>
> I got some trouble with creating XML Files.
>
> I have a DataSet with two tables (Calendar and holidays)
> and a Relationship (Nested = true) between both tables ("name").
>
> When I now write the XML I get:
> <Static>
> <Calendar>
> <name>AED</name>
> <holidays>
> <name>AED</name>
> <holiday>2008-12-08</holiday>
> </holidays>
> <holidays>
> <name>AED</name>
> <holiday>2008-12-10</holiday>
> </holidays>
> </Calendar>
> </Static>
>
> What I need is this:
> <Static>
> <Calendar>
> <name>AED</name>
> <holidays>
> <holiday>2008-12-08</holiday>
> <holiday>2008-12-10</holiday>
> </holidays>
> </Calendar>
> </Static>
>
> Does anybody knows how this can be done ??
>
> Thanks a lot for any comments.
>
> Best regards
> Frank
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Schema-Typed Dataset doesn't preserve nested tables order sunstormlabs@gmail.com Microsoft ADO .NET 1 18th Dec 2007 09:47 AM
Dataset with master and multiple nested tables in DotNet 2.0 WinFo =?Utf-8?B?REVXcmlnaHRfQ0FAb25saW5lLm5vc3BhbQ==?= Microsoft ADO .NET 2 14th Jun 2006 05:41 AM
Nested tables - How do you add a new row to a nested table? (codeattached) Benny Raymond Microsoft C# .NET 1 28th Oct 2005 07:06 AM
How can I merge an untyped nested dataset to a typed nested dataset? Jim Hunt Microsoft ADO .NET 0 5th Oct 2004 05:13 PM
Typed dataset, parent-child tables, and nested repeaters... =?Utf-8?B?QUM=?= Microsoft ADO .NET 0 1st Sep 2004 03:47 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:00 AM.