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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T22:16:30+00:00 2026-05-17T22:16:30+00:00

I am trying to pull data from a website using objective-c. This is all

  • 0

I am trying to pull data from a website using objective-c. This is all very new to me, so I’ve done some research. What I know now is that I need to use xpath, and I have another wrapper for that called hpple for the iPhone. I’ve got it up and running in my project.

I am confused about the way I retrieve information from the site. Apparently I am to use regular expressions in this line of code:

NSArray * a = [doc search:@"//a[@class='sponsor']"];

This is just an example. Is that stuff in the search:@”….” the regular expression? If so, I guess I can develop the hundreds of patterns that I will need for my program to parse the site (I need a lot of data), but is there a better way? I’m very lost in this. Any help is appreciated.

  • 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-17T22:16:30+00:00Added an answer on May 17, 2026 at 10:16 pm

    The parameter is an XPath, not a regular expression. Here’s a breakdown:

    • All xpaths are interpreted relative to a context node. In this case, it’s the root node.
    • // is an abbreviation meaning “all descendents”
    • a means “all child nodes with a node type of ‘a'” (in HTML, that’s anchors)
    • [...] contains a predicate, refining just which a to match
      • @ is an abbreviation for attribute nodes
      • @class means an attribute named “class”
      • @class='sponsor' means a class attribute equal to “sponsor”. Note this will not match nodes with a class containing “sponsor”, such as <a class="big sponsor" ...>; the class must be equal.

    All together, we have “‘a’ nodes descending from the root that have class equal to ‘sponsor'”.

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

Sidebar

Related Questions

I'm trying to use SharpZipLib to pull specified files from a zip archive. All
I am trying to modify a stored procedure I wrote to pull data from
I am trying to pull some data out of our testing database with an
I've generated some JSON and I'm trying to pull it into an object in
I would like to pull artifacts from teamcity. I've been trying to use c#
Using SQLite3 with Python 2.5, I'm trying to iterate through a list and pull
I'm trying to deploy a website using ASP.NET membership and the hosting company is
I'm trying to make a website using Dreamweaver. I'd like to have a page
I'm trying to make a local backup of the data from my Rails application,
I'm trying to make a pull down menu post a form when the user

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.