Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Find the nth match

Reply
Thread Tools

Find the nth match

 
 
liuchangjohn@gmail.com
Guest
Posts: n/a
 
      04-03-2008
Hi,

How can I select, say, the 5th <a> element in an XML, regardless of
their locations? '//a[5]' obviously doesn't work.

Thanks in advance!

Regards,
Liu Chang
 
Reply With Quote
 
 
 
 
Richard Tobin
Guest
Posts: n/a
 
      04-03-2008
In article <(E-Mail Removed)>,
http://www.velocityreviews.com/forums/(E-Mail Removed) <(E-Mail Removed)> wrote:

>How can I select, say, the 5th <a> element in an XML, regardless of
>their locations? '//a[5]' obviously doesn't work.


(//a)[5]

-- Richard
--
:wq
 
Reply With Quote
 
 
 
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I find the Nth index of array that is (whatever) usenet@DavidFilmer.com Perl Misc 12 09-21-2006 05:04 PM
how to find nth quote char? baibaichen C++ 6 12-14-2005 05:31 PM
Algorithm to find nth largest or nth smallest in a range Code4u C++ 4 07-13-2005 03:18 AM
Re:This is for the nth time I am posting. Is there no one to help! ani ASP .Net 1 11-07-2003 09:44 PM
This is for the nth time I am posting. Is there no one to help! ani ASP .Net 4 11-06-2003 03:30 PM



Advertisments