Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3965276
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T03:26:28+00:00 2026-05-20T03:26:28+00:00

I want to select number 4 or 5 links i have tried using this

  • 0

I want to select number 4 or 5 links

i have tried using this expression:

//div/b[contains(text(),'Sida:')]/following-siblings::a[4]

but it didnt work

The code for this part of my HTML is:

<div><b>Sida: </b> <a>1</a> « <a>3</a> <a>4</a> <a>5</a> » <a>814</a></div>

Here is how its looks

Link picture https://i.stack.imgur.com/rFmug.jpg

Sida:
 1 
 2 
 3 
 4 »
 814 

or

Sida:
 1  «
 3 
 4 
 5  »
 814 

there are a long html page without any id or class name – so i need autopager in firefox to find the correct link <a> and automatically auto inert next page

i just need the expression to pinpoint the number 4 or 5 – but these number are changing when page number are changing

check the web page l-like.it

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T03:26:29+00:00Added an answer on May 20, 2026 at 3:26 am

    You almost did it yourself.

    To get a node-set of two elements (which can be not what you want) you can use this:

    //div/b[contains(text(),'Sida:')]/following-sibling::a[
                    position() = 3 or position() = 4
                    ]
    

    Note: Use // only when schema is unknown.

    To get a concatenated string value:

    concat(
        //div/b[contains(text(),'Sida:')]/following-sibling::a[3],
        //div/b[contains(text(),'Sida:')]/following-sibling::a[4]
        )
    

    Output with the input below will be 45.

    XML test sample:

    <t>
        <div>bla-bla</div>
        <div id="test">
            <div>
                <b>Sida: </b>
                <a>1</a> «
                <a>3</a>
                <a>4</a>
                <a>5</a> »
                <a>814</a>
            </div>
        </div>
        <div>bla-bla</div>
    </t>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have this lists, and i want select li element from jquery when the
I have an application using JFileChooser to select a directory. In this app, I
I want to select a number of email addresses and then send an email
I want to write a map/reduce job to select a number of random samples
I m trying to select rows/columns using vba. I want to pass row numbers
i have users table and i have posts table i want select from users
I want to select all elements that have an accesskey defined on them. I
I want to write SQLite statement something like this: SELECT * FROM Table WHERE
I have output from a select like this: 04:47:37> select * from attributes left
I have a database to store people's quick links. This is a very basic

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.