HighTechTalks DotNet Forums  

Re: TOP clause with XPath

Dotnet XML microsoft.public.dotnet.xml


Discuss Re: TOP clause with XPath in the Dotnet XML forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Martin Honnen
 
Posts: n/a

Default Re: TOP clause with XPath - 06-30-2006 , 07:22 AM








Mario Vázquez wrote:


Quote:
Or, in other words, how to get a fixed number of nodes through a XPath
query?
Sure, do e.g.
(originalXPath)[position() >= 1 and position() <= 20]
to get the first 20 nodes (if there are as many).
So using a predicate and the position function allows you to
select/filter out a certain number. If you just want a certain number
then e.g.
(originalXPath)[10]
gives you the tenth node.


--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.