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 8483907
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T20:14:10+00:00 2026-06-10T20:14:10+00:00

Kindly take a look at the sample below– <div class=patent_bibdata> <b> First list</b> <a

  • 0

Kindly take a look at the sample below–

<div class="patent_bibdata">
     <b> First list</b>
     <a href="1"> Name #1</a>
     <a href="2"> Name #2</a>
     <b> Second list</b>
     <a href="1"> Name #2_1</a>
     <a href="2"> Name #2_2</a>
</div>

Now, I want to extract the links after the ‘b’ element that has text “First List”– however, I dont want the links after the ‘b’ element that has text “Second list”– and the number of links after “First List” is not known to me.

What I thought of, is something like this–

....XQuery code defining the document as variable named "doc"
let $list:= $doc/div[ @class="patent_bibdata"]/b[. = 'First list']/following-sibling::text() -- but this should get everything after 'First list'-- including 'Second List' and 'Name #2_1' and 'Name #2_2'

Now, only the text in the 2 ‘b’ tags– (i.e. ‘Name #1’ and ‘Name #2’ in our example) are known to me– so I think I have to somehow put conditions and retrieve the links (that I need), putting conditions on the immediate-predecessor-sibling and immediate-successor-sibling of those links— what are the commands to put those conditions(if I am right so far)? And if I am not right, then how do I go about getting that set of links?

  • 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-06-10T20:14:11+00:00Added an answer on June 10, 2026 at 8:14 pm

    This works:

    $doc/div[ @class="patent_bibdata"]/b[. = ' First list']/following-sibling::a[not(preceding-sibling::b[. = ' Second list'])]
    

    Considering the amount of rather basic questions you asked today about XQuery it might be advisable to get a fundamental understanding about XQuery first. There are some very good books out there, I especially like the one from Priscilla Walmsley.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Below are the list of my codes. Please kindly take a look. Option 1
I am in dilema to make decision on the below scenarios. Kindly need experts
I have been told, AppKit controls don't take kindly to being updated from threads
I want a layout like this. Please take a look the image As you
Kindly send me a code sample of how to run the music file when
Can any ony kindly explain that how we can take serial data as input
Firstly please take a look at the following code, which consists of 2 translation
I need to search for available wireless networks and take this list and store
I have a list of URLs and I need to take their snapshots .
Kindly Tell Me What is the best software to design GUI which is the

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.