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

  • Home
  • SEARCH
  • 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 6947029
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:38:28+00:00 2026-05-27T13:38:28+00:00

I have being messing about with DOM XPath stuff all day – reading around

  • 0

I have being messing about with DOM XPath stuff all day – reading around and tearing my hair out! So, last resort, ask you guys – the pros!

What I’m trying to do is retrieve (in an array) of all the titles of threads here.

I am trying to use XPath to do it (unless someone can tell me a better way); currently I am just trying to get just 1 title to check whether my code is working (clearly not!…)

I’m using:

$list3 = $xpath3
  ->evaluate("//a[contains(@style, 'font-weight:bold') and 
    contains(@href, 'showthread.php?t=3499047')]");

However nothing is getting retrieved

  • 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-27T13:38:29+00:00Added an answer on May 27, 2026 at 1:38 pm

    The reason you are not getting any results is that there is no <a> elements that satisfy both conditions.

    These are the links containing “3499047” in @href:

    <a href="showthread.php?s=9bc55ab5990282a5353fb20d505d577e&amp;t=3499047" id="thread_title_3499047">Tesco misprices and discussion (Thread 12)</a>
    <a href="showthread.php?s=9bc55ab5990282a5353fb20d505d577e&amp;t=3499047">1</a>
    <a href="showthread.php?s=9bc55ab5990282a5353fb20d505d577e&amp;t=3499047&amp;page=2">2</a>
    <a href="showthread.php?s=9bc55ab5990282a5353fb20d505d577e&amp;t=3499047&amp;page=3">3</a>
    <a href="showthread.php?s=9bc55ab5990282a5353fb20d505d577e&amp;t=3499047&amp;page=110">Last Page</a>
    <a href="member.php?s=9bc55ab5990282a5353fb20d505d577e&amp;find=lastposter&amp;t=3499047" rel="nofollow">ExiledCockney</a>
    <a href="misc.php?do=whoposted&amp;t=3499047" onclick="who(3499047); return false;">2,184</a>
    <a rel="shadowbox;width=732;height=527;player=iframe;" href="wow.php?t=3499047" target="_blank" style="display: block; width: 100%; height: 100%; cursor: pointer;">
            <div style="width: 100%; height: 100%;  background-image: url('http://images2.moneysavingexpert.com/images/forum_style_2/misc//wow_big_faint_grey.gif');">
                <div style="padding: 12px 0px 0px 0px;">
                    <strong>3</strong>
                </div>
            </div>
        </a>
    

    As you can see, none of them contain “‘font-weight:bold'” in a style attribute.

    In case the markup on the page has elements with your desired combination when you view it in a browser, they might have been added via javascript. DOM will not run any JavaScript, so you have to check the markup fetched with DOM.

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

Sidebar

Related Questions

I am about to pull my hair out!! So I have areas setup in
I've recently taken the plunge into DirectX and have been messing around a little
Lately, I have seen a lot of questions being asked about output for some
I have worked out about 90% of this, but can't seem to get the
I have being toying with the idea of creating software Robots to help on
I have being having trouble with the web server used for our intranet. It
I have a page being loaded with jQuery. The initial load includes 100 records
I have a Form being launched from another form on a different thread. Most
I have a model being populated by my data layer and then I have
I have a webapp being hosted with a public hosting company, the site is

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.