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. Advertising

  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. Advertising

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. ani
    Replies:
    4
    Views:
    1,223
  2. ani
    Replies:
    1
    Views:
    359
    Keith
    Nov 7, 2003
  3. Code4u
    Replies:
    4
    Views:
    2,628
    Stephen Howe
    Jul 13, 2005
  4. baibaichen

    how to find nth quote char?

    baibaichen, Dec 14, 2005, in forum: C++
    Replies:
    6
    Views:
    444
    Jay Nabonne
    Dec 14, 2005
  5. Replies:
    12
    Views:
    244
    Ted Zlatanov
    Sep 21, 2006
Loading...

Share This Page