Mark Wilson I am the creator of TopXML. I am available for international and local (Australia) contracts. I am a Solution Architect/Business Analyst. I have worked in IT in several countries (NZ, Australia, South Africa, UK) building and training teams for government and very large non-governmental organizations. I am ex-Microsoft Consulting Services. I wrote the first book on Microsoft XML published in 2000 called XML Programming with VB and ASP. Most recently I have been building tools for the SEO industry. Ask me for a 37 point SEO health-checkup for your website.
First posted :
03/13/2008
Times viewed :
35828
Learn XQuery and ASP.NET Tutorial
Introducing you to XQuery and help you how to use it in
ASP.NET. This article and the demo
project are updated for use in VS.NET 2003 / .NET FW v1.1, with the MS XQuery
Demo downloaded and installed.
The article will try to reflect the latest changes to the
XQuery 1.0 specification, but due to the fact that Microsoft still has its
implementation (MS XQuery Demo) based on the December 20, 2001 specification
(see it here http://www.w3.org/TR/2001/WD-xquery-20011220/),
I can only mention what has changed over time; if possible I’ll do that using
references to specific sections of the W3C specification.
This article starts with explaining what XQuery is and its
purpose besides current query languages like XPath and XSLT.
Then we'll move on to look at some simple XQuery Path
Expressions. We'll see how they are constructed and what results they should
obtain given an example XML source document. We'll see that these path
expressions are extremely readable and easy to write.
During this exploration, you’ll be able to play with XQuery
Path Expressions yourself, using a simple ASP.NET C# Web Application. It is
assumed that you know the basics of how to use VS.NET (creating a new project,
adding references to a project, programming in code-behind mode, etc.).
We will see what XQuery is, and how it is supported in the .NET Framework. We
will build a simple XQueryTester application, which enabled us to run some basic
xqueries over a single XML input source document.
After that you should be able to go further in-depth. For example, a good
topic to investigate from this point would be to develop a new application,
which makes use of more than one XQueryNavigator. For example, you could create
a new XQueryNavigator for each of the tables (or files) you need to query, and
then run nested FLWR xqueries over it, just like you would do using SQL.