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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T23:39:43+00:00 2026-06-09T23:39:43+00:00

Using XpathBuilder I can construct a simple search engine query and pull data out

  • 0

Using XpathBuilder I can construct a simple search engine query and pull data out of the search results using XPath. I have some simple examples in a Google spreadsheet here, which runs the query "XPath tutorial" on various search engines and attempts to pull out the number of results each search engine returns.

The formula in that Google spreadsheet is as follows:

=importxml("http://www.google.com/search?q="xpath+tutorial"&num=30&pws=0", 
           "//div[@id='resultStats']")
=importxml("http://www.bing.com/search?q=xpath+tutorial&count=30", 
           "//span[@class='sb_count']")
=importxml("http://search.yahoo.com/search?p=xpath+tutorial&n=30", 
           "//span[@id='resultCount']")

There are some oddities about this that I don’t understand. Firstly, the Google search does not return any results, but the XPath query looks OK. Indeed, there are a number of online tutorials which recommend exactly what I have done here.

The Yahoo query returns the correct result, it’s the only one that does.

The number of results found by the Bing Xpath query do not match the results given on the Bing web page, even though there is only one XML node which matches the XPath query. More details are on the spreadsheet here

Where did it all go so wrong?

  • 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-09T23:39:44+00:00Added an answer on June 9, 2026 at 11:39 pm

    Try this….

    =importxml("http://www.google.com/search?q='xpath+tutorial&num=30&pws=0'", "//div[@id='resultStats']")
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using jQuery, one can easily find out whether a particular element is visible using
Using Android TelephonyManager an application can obtain the state of data activity over the
Using Core Data, I have a fetch request to fetch the minimum of a
Using C# .NET 3.5 and WCF, I'm trying to write out some of the
using this http://bl.ocks.org/950642 we can see how to add images to nodes, the question
Using Location.getBearing(); I seem to get randomly changing bearings. Aka, I can turn the
Using android 2.3.3, I have a background Service which has a socket connection. There's
Using the HTML5 File API I can get the Binary String representation of a
Using MVC2 I have an AJAX form which is posting to a bound model.
using a binary search tree I need to add to a vector all int

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.