Re: Saving dataset as nested XML
From: Paul Eden (a_at_b.com)
Date: 10/04/04
- Previous message: Richard L Rosenheim: "Re: Saving dataset as nested XML"
- In reply to: Richard L Rosenheim: "Re: Saving dataset as nested XML"
- Next in thread: Richard L Rosenheim: "Re: Saving dataset as nested XML"
- Reply: Richard L Rosenheim: "Re: Saving dataset as nested XML"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 04 Oct 2004 18:24:55 GMT
Richard
I been fidling with this for most of the day. My Schema, when loaded
into the dataset, generates all the relevent relationships (this I did
not realise, going on the lack of correct output), with nested set to
true (via interogating the dataset).
I finally too the step of clearing the Relations collection on the data
set, and re-creating them manually (which was a bit of a bugger,
becausae I had to go through and add ID fields for the relationships)...
BUT.. my ouput is now nested.
A long winded and painfull fix, but it's the only one I found - hope an
MS bod is reading - would be interesting to hear thier side.
Paul
Richard L Rosenheim wrote:
> You are correct -- having IsNested="true" doesn't seems to make any
> difference what-so-ever. In the XML file that I attached to my previous
> post, it contained IsNested="true" attributes for the keys.
>
> Richard Rosenheim
>
>
>
> "Paul Eden" <a@b.com> wrote in message
> news:0Rb8d.56$hs3.38@newsfe5-win.ntli.net...
>
>>Richard
>>
>>I'm having much the same issue. In one post I read that you have to set
>>up the relationships in the dataset and have the relationship flaged as
>>Nested=True, but this did not create the desired output either..
>>actually, it made no difference whatsoever. It might make a difference
>>for you?
>>
>>I can post my schema and code if required.
>>
>>
>>Paul
>>
>>Richard L Rosenheim wrote:
>>
>>>I've been trying to save a dataset to a XML file and have the child data
>>>nested under the parent data. Everything I have tried so far results in
>
> all
>
>>>the records from the parent table being listed followed by all the rows
>
> of
>
>>>the child table.
>>>
>>>As a result of previous posts, I currently created my tables based upon
>
> the
>
>>>steps outlined in
>>>
>
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbtskcreatingnestedrelationshipsinxmlschemas.asp
>
>>>For my example, I created three tables: Contacts, Telephones and
>
> Addresses
>
>>>where Telephones and Addresses are defined as children of Contacts. In
>
> the
>
>>>resulting schema, Telephones and Addresses are nested within Contacts.
>
> But
>
>>>the actual data is not.
>>>
>>>What I'm looking to achieve is to have the data outputted in a format
>
> like:
>
>>> <Contacts>
>>> <Addresses>
>>> </Addresses>
>>> <Telephones>
>>> </Telephones>
>>> <Telephones>
>>> </Telephones>
>>> </Contacts>
>>>instead of the structure I'm getting:
>>> <Contacts>
>>> </Contacts>
>>> <Contacts>
>>> </Contacts>
>>> <Addresses>
>>> </Addresses>
>>> <Telephones>
>>> </Telephones>
>>> <Telephones>
>>> </Telephones>
>>>
>>>Anyone have any ideas? Attached is the resulting XML file I'm getting,
>
> with
>
>>>schema. I'm using Visual Studio 2003.
>>>
>>>TIA,
>>>
>>>Richard Rosenheim
>>>
>>>
>
>
>
- Previous message: Richard L Rosenheim: "Re: Saving dataset as nested XML"
- In reply to: Richard L Rosenheim: "Re: Saving dataset as nested XML"
- Next in thread: Richard L Rosenheim: "Re: Saving dataset as nested XML"
- Reply: Richard L Rosenheim: "Re: Saving dataset as nested XML"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|