473,324 Members | 2,456 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

datasets and XML

Hi,

I have the following data I want to produce from a dataset.

<Request>
<Ref>123</Ref>
<RefType>Search</RefType>
<CriteriaList>
<Criteria Type="Detail">XXX123</Criteria>
<Criteria Type="Detail">XXX345</Criteria>
<Criteria Type="Summary">XXX678</Criteria>
</CriteriaList>
</Request>

I am getting the Ref, RefType, Criteria and Type information from a SQL
table but when I try to produce XML which looks like the above the best I
can get it is as below:

<NewDataSet>
<Request>
<Ref>123</Ref>
<RefType>Search</RefType>
</Request>
<CriteriaList>
<Criteria>XXX123</Criteria>
</CriteriaList>
<CriteriaList>
<Criteria>XXX345</Criteria>
</CriteriaList>
<CriteriaList>
<Criteria>XXX678</Criteria>
</CriteriaList>
</NewDataSet>

I'm returning two recordsets from SQL (from an SP) and creating a
DataRelation on CriteriaList:

Ref RefType CriteriaList
TG0001 Search_Order NULL

CriteriaList Criteria
NULL 654
NULL AUTOGEN
NULL AUTOGEN

Am I lost here or what? Any help would be appreciated?

Thanks,
Dave
Nov 15 '05 #1
1 1165
You have used the Dataset.WriteXml() method, that is an "xml object
serialization" method.

If you want a different xml output take a look to the XslTransformation:

http://msdn.microsoft.com/library/de...ClassTopic.asp

Here, there is an example

http://msdn.microsoft.com/library/de...LoadTopic2.asp

Sorry I never used it, so more than that I cannot help you

"Dave" <da**@telco.co.uk> schrieb im Newsbeitrag
news:uD**************@TK2MSFTNGP09.phx.gbl...
Hi,

I have the following data I want to produce from a dataset.

<Request>
<Ref>123</Ref>
<RefType>Search</RefType>
<CriteriaList>
<Criteria Type="Detail">XXX123</Criteria>
<Criteria Type="Detail">XXX345</Criteria>
<Criteria Type="Summary">XXX678</Criteria>
</CriteriaList>
</Request>

I am getting the Ref, RefType, Criteria and Type information from a SQL
table but when I try to produce XML which looks like the above the best I
can get it is as below:

<NewDataSet>
<Request>
<Ref>123</Ref>
<RefType>Search</RefType>
</Request>
<CriteriaList>
<Criteria>XXX123</Criteria>
</CriteriaList>
<CriteriaList>
<Criteria>XXX345</Criteria>
</CriteriaList>
<CriteriaList>
<Criteria>XXX678</Criteria>
</CriteriaList>
</NewDataSet>

I'm returning two recordsets from SQL (from an SP) and creating a
DataRelation on CriteriaList:

Ref RefType CriteriaList
TG0001 Search_Order NULL

CriteriaList Criteria
NULL 654
NULL AUTOGEN
NULL AUTOGEN

Am I lost here or what? Any help would be appreciated?

Thanks,
Dave

Nov 15 '05 #2

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

Similar topics

0
by: William Ryan | last post by:
At the risk of sounding like a Big 5 consultant, "It depends". 1) Strongly typed datasets rock, they are faster than untyped, use intellisense... but your reason for wanting to use them is...
4
by: Alpha | last post by:
I have a small Window application and through out the different forms I create a different dataset. At the begining I used the Tools to drag and drop the SqlDataAdapter, connection and dataset...
9
by: GaryDean | last post by:
We have been noticing that questions on vs.2005/2.0 don't appear to get much in answers so I'm reposting some questions posted by some of the programmers here in our organization that never got...
16
by: Luqman | last post by:
Is it recommended to use datasets in ASP.Net 2.0 / VS.Net 2005 ? Best Regards, Luqman
4
by: Ronald S. Cook | last post by:
I've always used untyped datasets. In a Microsoft course, it walks through creating typed datasets and harps on the benefits. It has you drag all these things around ..wizard, wizard, wizard......
25
by: Penelope Dramas | last post by:
Hello, I'm in a front of very serious .net redesign/rewrite of an old VB6 application. I had been asked to make it .NET 2.0 and would like to ask couple of questions regarding data access as...
2
by: S.Tedeschi | last post by:
Hi all gurus. I'm trying to switch to VS 2005, from VS 2003. I've an ASP.NET 1.1 app heavily relying on StronglyTyped DataSets, with lots of FindByKey..., dataSet.Tablename, and similar methods....
0
by: S.Tedeschi | last post by:
Hi all; as posted some days ago, I'm converting an on-line app; I used to heavily rely on strongly-typed DataSets directly dropped onto pages, and so viewed by code(-behind) as well. In the next...
12
by: BillE | last post by:
I'm trying to decide if it is better to use typed datasets or business objects, so I would appreciate any thoughts from someone with more experience. When I use a business object to populate a...
9
by: gardnern | last post by:
We have X number of data sets, of Y length each. For example... Small, Medium, Large and Red, Green, Blue, Yellow We need to generate a list of all possibilities Small Red
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.