Find the nth match

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • liuchangjohn@gmail.com

    Find the nth match

    Hi,

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

    Thanks in advance!

    Regards,
    Liu Chang
  • Richard Tobin

    #2
    Re: Find the nth match

    In article <1a11787f-5f9b-4a8c-9eec-394ed309124d@c1 9g2000prf.googl egroups.com>,
    liuchangjohn@gm ail.com <liuchangjohn@g mail.comwrote:
    >How can I select, say, the 5th <aelement in an XML, regardless of
    >their locations? '//a[5]' obviously doesn't work.
    (//a)[5]

    -- Richard
    --
    :wq

    Comment

    Working...