M
Mike
Can anyone tell me if this is possible?
We have several ASP/SQL Server 2000/XSLT applications with hundreds of
stored procedures returning data using FOR XML EXPLICIT. What we
would like to do is port to .NET and support numerous different
databases by changing the stored procedures to return "normal"
resultsets (i.e. a recordset), then convert the recordset to XML and
pass to the XSLT to generate the HTML output.
I have seen the GetXML() method of the Dataset object but this seems
to only be able to generate simple XML output. By that I mean a
simple table with rows and columns would produce:
<table>
<row>
<column1>data</column1>
<column2>data</column2>
<column3>data</column3>
....
</row>
<row>...</row>
</table>
Is there a way to produce more heirarchical XML as I can generate
using the FOR XML EXPLICIT syntax and multiple table joins? e.g.
<order ordernumber="5" vat="4.17" deliverycharge="3.95"
totalcost="36.02" orderdate="2004-01-22 11:44:58">
<emailaddress><![CDATA[[email protected]]]></emailaddress>
<itemtype itemtypeid="171" cost="27.90" costhasnulls="0">
<title><![CDATA[Containers]]></title>
<msgs><![CDATA[]]></msgs>
<orderorderitem id="6" productcode="SH127" quantity="1">
<title><![CDATA[Cylinder]]></title>
<deliverydetails><![CDATA[e<br/>f<br/>g<br/>h<br/>United
Kingdom]]></deliverydetails>
<invoicedetails><![CDATA[a<br/>b<br/>c<br/>d<br/>Afghanistan]]></invoicedetails>
<notes><![CDATA[]]></notes>
<dispatch/>
</orderorderitem>
<orderorderitem>
...
</orderorderitem>
</itemtype>
<itemtype>
...
</itemtype>
</order>
Thanks in advance,
Mike.
We have several ASP/SQL Server 2000/XSLT applications with hundreds of
stored procedures returning data using FOR XML EXPLICIT. What we
would like to do is port to .NET and support numerous different
databases by changing the stored procedures to return "normal"
resultsets (i.e. a recordset), then convert the recordset to XML and
pass to the XSLT to generate the HTML output.
I have seen the GetXML() method of the Dataset object but this seems
to only be able to generate simple XML output. By that I mean a
simple table with rows and columns would produce:
<table>
<row>
<column1>data</column1>
<column2>data</column2>
<column3>data</column3>
....
</row>
<row>...</row>
</table>
Is there a way to produce more heirarchical XML as I can generate
using the FOR XML EXPLICIT syntax and multiple table joins? e.g.
<order ordernumber="5" vat="4.17" deliverycharge="3.95"
totalcost="36.02" orderdate="2004-01-22 11:44:58">
<emailaddress><![CDATA[[email protected]]]></emailaddress>
<itemtype itemtypeid="171" cost="27.90" costhasnulls="0">
<title><![CDATA[Containers]]></title>
<msgs><![CDATA[]]></msgs>
<orderorderitem id="6" productcode="SH127" quantity="1">
<title><![CDATA[Cylinder]]></title>
<deliverydetails><![CDATA[e<br/>f<br/>g<br/>h<br/>United
Kingdom]]></deliverydetails>
<invoicedetails><![CDATA[a<br/>b<br/>c<br/>d<br/>Afghanistan]]></invoicedetails>
<notes><![CDATA[]]></notes>
<dispatch/>
</orderorderitem>
<orderorderitem>
...
</orderorderitem>
</itemtype>
<itemtype>
...
</itemtype>
</order>
Thanks in advance,
Mike.