MS SQL Server
  Home arrow MS SQL Server arrow XML and the SQL 2000 Server part 3: XML Da...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
MS SQL SERVER

XML and the SQL 2000 Server part 3: XML Data with XPath Queries
By: Jayaram Krishnaswamy
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 12
    2005-05-25

    Table of Contents:
  • XML and the SQL 2000 Server part 3: XML Data with XPath Queries
  • Xpath Queries
  • XDR Schema and XML View Mapper
  • Adding an SQL Module
  • Generating and Mapping an XDR Schema
  • Testing an Xpath Query Using the Internal Tester
  • Exporting Schema and Query in URL
  • Xpath Query With a Template File

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    XML and the SQL 2000 Server part 3: XML Data with XPath Queries


    (Page 1 of 8 )

    This third article in the series on using XML with SQL Server 2000 covers more information on using Xpath quesries. Jayaram Krishnaswamy writes about using the XML View Mapper to create XML views to use in Xpath queries and how to use Xpath queries with the database.

    In Part 1, I discussed the infrastructural details for accessing data from SQL 2000 Server using XML over HTTP. Also I discussed the T-SQL language extensions for facilitating data access using XML. Part 2 focussed on the practical aspects of querying over HTTP, in particular, using URL queries and template queries for both SQL Stataments. I also spoke about stored procedures for data access.

    In this tutorial, yet another way of accessing data with Xpath queries will be my topic of discussion. SQL 2000 server's support for XDR schemas provide the ability to specify Xpath queries against these schemas. In order to facilitate the derivation of these XDR schemas, Microsoft also provides an XML tool: XML View Mapper (not bundled with SQL 2000 Server, but a separate download). The bulk of the tutorial is about the basics of using this tool to create XML views that can be used in Xpath queries and using Xpath queries to query the database. For the purposes of discussion, a very small database is chosen to make the screen shots more viewer friendly. It may be helpful to review parts 1 and 2 referenced above as well as visit the w3c site to get a good understanding of the Xpath basics and syntax.

    What are Xpath queries?

    Xpath is a XML navigational language developed by the w3c organization. XML documents are based on hierarchical tree-like structure with nodes. Xpath provides a means to navigate to node/nodes within an XML document. Xpath queries are not the same type of implementation as URL queries and queries with template files considered in the previous tutorial. Direct URL queries and template based queries access data based on SQL. However, Xpath queries use a different mechanism.

    More MS SQL Server Articles
    More By Jayaram Krishnaswamy


     

    MS SQL SERVER ARTICLES

    - Windows Server 2008 as a Workstation OS
    - An Overview of Windows Server 2008 R2
    - LINQ to MySQL, Oracle and PostgreSQL Provide...
    - Completing the Introduction to Transact-SQL
    - A Brief Introduction to Transact-SQL
    - Lookups and Blocking Bad Data
    - Field Validation Rules for Blocking Bad Data
    - Using Masks to Block Bad Data
    - Blocking Bad Data
    - Using @@ROWCOUNT and TABLE Variables for Dat...
    - How to Use Variables, IF and CASE in Databas...
    - Creating Important Aspects of Notification S...
    - Working wth Variables in Database Interactio...
    - Delving Deeper into Notification Services
    - Notification Services





    © 2003-2010 by Developer Shed. All rights reserved. DS Cluster 10 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek