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/24/2008
Times viewed :
191
Programming with XQuery classes
From the programming point of view, the classes needed to run an xquery are
basically XQueryNavigator, XQueryNavigatorCollection, and XQueryExpression. How
they interrelate can best be shown as follows:
Fig. 3: MS XQuery Demo managed class set
In the above diagram we see that the XQueryNavigatorCollection is a
collection of XQueryNavigator classes. Each XQueryNavigator represents a set of
data (i.e., an XML file or a database table converted to XML). From now on,
we'll call them simply navigators here.
The XQueryExpression contains the xquery. This xquery defines the target
navigators to run the xquery over, as we'll see later on in the example section.
To be able to run xqueries, in the following section we'll be creating a
simple xquery tester, which later is used to run various xqueries over a basic
and simple XML source document, to show you a series of basic xqueries.