views:

53

answers:

2

Hello,

I am working on gather sports statistics for a personal hobby project. I found this site with all the info I need:file:///Users/JohnJNichols4/Desktop/view-source%20cluster.leaguestat.com%20download.php%20client_code=ahl&file_path=daily-report%20daily-report.html

Am I able to parse this site with xpath? I only have experience (little experience) with cocoa and xcode, so I am writing this is objective c with a wrapper called hpple. My problem arises when I need to pull info from the tables. I have no idea how to go about this. The xpath expressions that I enter are all wrong. Can anyone show me how one might parse the standings in the first table? The function I am using is:

NSArray *elements  = [xpathParser search:@"xpath stuff goes here"];

Thanks a lot!

EDIT URL

Sorry guys, I put up the local URL by mistake. Here is the right one: http://cluster.leaguestat.com/download.php?client_code=ahl&file_path=daily-report/daily-report.html

+1  A: 

If you want to treat it as XML, you can, but it'll have to be properly formed, which isn't always the case with HTML. I'd recommend using the TouchXML library, it has great xpath support and a fair amount of documentation and examples.

http://foobarpig.com/iphone/touchxml-installation-guide.html

UltimateBrent
The reason I can't treat it as html is because I want my program to automatically pull the updated stats every day. Can that happen if I convert the page to html?
JohnJ
The URL is updated. I used my local address by mistake.
JohnJ
A: 

Anybody have ideas about this? I am severely stuck.

JohnJ