Hi,
I am currently struggling with trying to read information from a SQL Server 2000 database into an XML document.
I am trying to apply the template file query method.
My template file looks like this:
pretty simple, however, when I run the template file, by typing the following in the URL:
my output looks like this :
- not quite what I wanted!
What I am trying to achieve, is this :
If anyone can shed some light as to why it's not working, please do.
Much appreciated, Thanks,
Mike.
I am currently struggling with trying to read information from a SQL Server 2000 database into an XML document.
I am trying to apply the template file query method.
My template file looks like this:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<root xmlns:sql="urn:schemas-microsoft-com:xml-
sql">
<sql:query>
SELECT Code AS [Code], Description AS
[Description], Price AS [Price]
FROM Products
FOR XML AUTO, ELEMENTS
</sql:query>
</root>
pretty simple, however, when I run the template file, by typing the following in the URL:
Code:
[URL unfurl="true"]http://10.34.49.2/AckXML/template/AckOrderForm1.xml[/URL]
my output looks like this :
Code:
<?xml version="1.0" encoding="UTF-8" ?>
- <root xmlns:sql="urn:schemas-microsoft-com:xml-sql">
<sql:query>SELECT Code AS [Code], Description AS
[Description], Price AS [Price] FROM Products FOR XML
AUTO, ELEMENTS</sql:query>
</root>
- not quite what I wanted!
What I am trying to achieve, is this :
Code:
<?xml version="1.0" encoding="utf-8" ?>
- <root>
- <Products>
<Code>0000000001</Code>
<Description>T Shirt</Description>
<Price>99.99</Price>
</Products>
- <Products>
<Code>0000000002</Code>
<Description>Jacket</Description>
<Price>109.99</Price>
</Products>
- <Products>
<Code>0000000003</Code>
<Description>Pants</Description>
<Price>89.99</Price>
</Products>
- <Products>
<Code>0000000004</Code>
<Description>Shorts</Description>
<Price>79.99</Price>
</Products>
- <Products>
<Code>0000000005</Code>
<Description>Boxer Shors</Description>
<Price>59.99</Price>
</Products>
- <Products>
<Code>0000000006</Code>
<Description>Socks</Description>
<Price>29.99</Price>
</Products>
</root>
If anyone can shed some light as to why it's not working, please do.
Much appreciated, Thanks,
Mike.