This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
hpple /
| name | age | message | |
|---|---|---|---|
| |
.gitattributes | Sat Jan 31 15:52:47 -0800 2009 | |
| |
.gitignore | Sat Jan 31 15:53:47 -0800 2009 | |
| |
Classes/ | Mon Jul 27 12:28:18 -0700 2009 | |
| |
GTMDefines.h | Sat Jan 31 15:52:47 -0800 2009 | |
| |
GTMIPhoneUnitTestDelegate.h | Sat Jan 31 15:52:47 -0800 2009 | |
| |
GTMIPhoneUnitTestDelegate.m | Sat Jan 31 15:52:47 -0800 2009 | |
| |
GTMIPhoneUnitTestMain.m | Sat Jan 31 15:52:47 -0800 2009 | |
| |
GTMSenTestCase.h | Sat Jan 31 15:52:47 -0800 2009 | |
| |
GTMSenTestCase.m | Sat Jan 31 15:52:47 -0800 2009 | |
| |
Hpple.xcodeproj/ | Mon Jul 27 12:28:18 -0700 2009 | |
| |
Hpple_Prefix.pch | Sat Jan 31 15:52:47 -0800 2009 | |
| |
Info.plist | Sat Jan 31 15:52:47 -0800 2009 | |
| |
LICENSE.txt | Sat Jan 31 15:52:47 -0800 2009 | |
| |
MainWindow.xib | Sat Jan 31 15:52:47 -0800 2009 | |
| |
README.markdown | Sat Jan 31 16:07:59 -0800 2009 | |
| |
TFHpple.h | Fri Feb 27 22:18:45 -0800 2009 | |
| |
TFHpple.m | Mon Jul 27 12:28:18 -0700 2009 | |
| |
TFHppleElement.h | Sat Jan 31 15:52:47 -0800 2009 | |
| |
TFHppleElement.m | Mon Jul 27 12:28:18 -0700 2009 | |
| |
Test-Info.plist | Sat Jan 31 15:52:47 -0800 2009 | |
| |
UnitTesting/ | Mon Jul 27 12:28:18 -0700 2009 | |
| |
XPathQuery.h | Sat Jan 31 15:52:47 -0800 2009 | |
| |
XPathQuery.m | Sat Jan 31 15:52:47 -0800 2009 | |
| |
main.m | Sat Jan 31 15:52:47 -0800 2009 |
README.markdown
DESCRIPTION
EXPERIMENTAL! Only a few hours old.
Hpple: A nice Objective-C wrapper on the XPathQuery library for parsing HTML.
Inspired by why the lucky stiff's Hpricot.
AUTHOR
Geoffrey Grosenbach, Topfunky Corporation and PeepCode Screencasts.
FEATURES
- Easy searching by XPath (CSS selectors are planned)
- Parses HTML (XML coming soon)
- Easy access to tag content, name, and attributes.
INSTALLATION
- Open your XCode project and the Hpple project.
- Drag the "Hpple" directory to your project.
- Add the libxml2.2.dylib framework to your project and search paths as described at Cocoa with Love
More documentation and short screencast coming soon...
USAGE
See TFHppleHTMLTest.m in the Hpple project for samples.
#import "TFHpple.h" NSData * data = [NSData dataWithContentsOfFile:@"index.html"]; TFHpple * doc = [[TFHpple alloc] initWithHTMLData:data]; NSArray * elements = [doc search:@"//a[@class='sponsor']"]; TFHppleElement * element = [elements objectAtIndex:0]; [e content]; // Tag's innerHTML [e tagName]; // "a" [e attributes]; // NSDictionary of href, class, id, etc. [e objectForKey:@"href"]; // Easy access to single attribute
TODO
- Internal error catching and messages
- CSS3 selectors in addition to XPath







