Mark, If you have three select statements ,you are going to have three
datatables in your dataset. If you are using the Select <ROOT> and Select
</ROOT> just to have the document structured, there are other ways to
accomplish it. As far as the ADO aspect of it goes, ADO.NET is simply going
to return what the DB returns and depending on the object you use to
retrieve the query, you'll get vastly different results. If you can the Root
select statements, I think you can just use the For XML Raw predicate and
then string s = cmd.ExecuteScalar(); . I don't access my XML like this but I
believe it will work in that s will now be the one xml doc.
There are some really powerful tools for dealing with XML though and you can
use an XML Reader for instance and just walk through it, appending each tag
to a stringbuilder for instance and then use Stringbuilder.ToString() and
you could force it all into one string object. Hit google for XMLReader and
you'll find a lot of good examples...If I have some free time tonight I'll
try to put a couple of different samples together for you.
Cheers,
Bill
Mark said:
Thanks for help.
I see what you are saying.
Here what I have so far.
My SP has three select statements: (simplified)
select <root>
select data for xml auto
select </root>
My undestanding of ADO is that the result should be a single string.
That's not what I am getting.
I have something like this:
- <Table><Column1><ROOT></Column1></Table>
on a top of my xml, then three sets of:
- <Table1><XML_F52E2B61-18A1-11d1-B105-00805F49916B><.... some
data.... said:
- <Table1><XML_F52E2B61-18A1-11d1-B105-00805F49916B><.... some