Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XML newbie

Status
Not open for further replies.

tc3596

Technical User
Mar 16, 2001
283
I am following the Books online sample of using a template file in a url to display the XML content in a web page...

template file.....
<ROOT xmlns:sql="urn:schemas-microsoft-com:xml-sql">
<sql:xpath-query mapping-schema="C:\Inetpub\ SELECT Cus_No, Cus_Name
FROM ARCUSFIL_SQL
</sql:xpath-query>
</ROOT>

I thought I had to create a schema file to be able to format the template query correctly. At this point, I just want to have the data display on the web page other than standard xml. I have the virtual directory all set up and it was displaying standard xml before I tried using xpath and a schema.

schema file.....
<Schema xmlns="urn:schemas-microsoft-com:xml-data"
xmlns:dt="urn:schemas-microsoft-com:datatypes">

<ElementType name="arcusfil_sql" content="empty" model="closed">
<AttributeType name="cus_no" dt:type="string"/>
<AttributeType name="cus_name" dt:type="string"/>

<attribute type="cus_no"/>
<attribute type="cus_name"/>
</ElementType>
</Schema>

My hope is to use the schema file as a format guide to the template query and display it nicely on the web page. I am getting an error when I type ...

" in my browser. Any thoughts?

The is the browser output...

- <ROOT xmlns:sql="urn:schemas-microsoft-com:xml-sql">
<?MSSQLError HResult="0x80040e14" Source="Microsoft XML Extensions to SQL Server" Description="MSXML3: is an invalid or unsupported XPath"?>
</ROOT>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top