MartyConnelly
martyconnelly at shaw.ca
Thu Apr 19 19:55:50 CDT 2007
As long as you are clear that XQuery now runs in SQL 2005 only. Using XQuery to manage XML with SQL Server 2005, you can create a table or a stored XML document in an xml datatype Maybe you can run from a Stored Procedure not sure. Microsoft originally included XQuery in the .NET framework for use with client-side XML processing. They have since removed it from the .NET framework and kept XQuery native only to the SQL Server environment. The reasons for this vary from being more secure to better performance by having it at the SQL Server level. The .NET framework does still include XML client-side parsing capability through the use of the Systems.XML namespace, however. this namespace includes Xpath 2.0, a language for locating and extracting parts of an XML document. XQuery can also use Xpath expressions. Xpath 1.0, 2.0 is also available with XML 4.0 and XML 6.0 standalone parsers I'll post a couple of XPath VBA examples. Jim DeMarco wrote: >Thanks Marty. I'll pass this on to my team. > >We're using XQuery but we're not strongly tied to it. I had mentioned >XPath but I thought that was used to access one piece of data (or one >related set of nodes out of a structure). We need to return select >nodes based on criteria. Is this an accurate description of differences >betweent the two do you think? > > >Jim > >-----Original Message----- >From: accessd-bounces at databaseadvisors.com >[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of MartyConnelly >Sent: Thursday, April 19, 2007 12:59 PM >To: Access Developers discussion and problem solving >Subject: Re: [AccessD] XQuery in VB 6 > >I have only used XQuery with SQL 2005 & VB.Net I have XPath examples in >VBA > >Are you using XQuery or XPath? > > XPath is imbedded in both XSLT and XQuery. In those languages it serves >the role of node-set identification (selection) > >XQuery example > >Dim sql_getbank As String = "SELECT >Demographics.query('data(//BankName)') " _ > > & "FROM Store WHERE CustomerID = @CustomerID" > > >XPath example > > Set oAdviserDetailsNode = oDOMDocument.documentElement > 'use appropriate XPath expression to select nodes > Set oNodeList = >oAdviserDetailsNode.selectNodes("//BusinessDetails/*") > >Have a look at >SQL Server 2005 XQuery and XML-DML - Part 2 By Alex Homer > >http://www.15seconds.com/issue/050811.htm > > >Jim DeMarco wrote: > > > >>X-posted AccessD, VB >> >>Hello All, >> >>I've been absent for a while but an issue has just come up that I hope >>someone can help with. >> >>Does anyone have any VB 6 code that uses XQuery to return a set of >>nodes? I find plenty of XQuery examples that show the query and the >>returned nodes but no VB 6 implementation. >> >>Any short code snip will do. >> >>TIA, >> >>Jim DeMarco >> >> >> >> >> > >-- >Marty Connelly >Victoria, B.C. >Canada > >-- >AccessD mailing list >AccessD at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/accessd >Website: http://www.databaseadvisors.com > > > -- Marty Connelly Victoria, B.C. Canada