Find the nth match

Discussion in 'XML' started by liuchangjohn@gmail.com, Apr 3, 2008.

  1. Guest

    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
     
    , Apr 3, 2008
    #1
    1. Advertisements

  2. In article <>,
    <> 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
     
    Richard Tobin, Apr 3, 2008
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. hiwa
    Replies:
    0
    Views:
    808
  2. Victor
    Replies:
    2
    Views:
    807
    Victor
    May 17, 2004
  3. Code4u
    Replies:
    4
    Views:
    2,975
    Stephen Howe
    Jul 13, 2005
  4. baibaichen

    how to find nth quote char?

    baibaichen, Dec 14, 2005, in forum: C++
    Replies:
    6
    Views:
    558
    Jay Nabonne
    Dec 14, 2005
  5. Wybo Dekker
    Replies:
    1
    Views:
    631
    Yukihiro Matsumoto
    Nov 15, 2005
  6. Replies:
    12
    Views:
    371
    Ted Zlatanov
    Sep 21, 2006
  7. vdvorkin
    Replies:
    0
    Views:
    623
    vdvorkin
    Feb 10, 2011
  8. vdvorkin
    Replies:
    3
    Views:
    1,092
    vdvorkin
    Feb 14, 2011
Loading...