M
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?
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?