topfunky/hpple
topfunky/hpple has 2,791 GitHub stars and 462 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-07 19:48 UTC. Last push 2021-07-15.
An XML/HTML parser for Objective-C, inspired by Hpricot.
What you can do
- Easy searching by XPath (CSS selectors are planned)
- Parses HTML (XML coming soon)
- Easy access to tag content, name, and attributes.
Measured star growth
- in 24h
- 0
- in 7 days
- Update delayed
- in 15 days
- Update delayed
- in 1 month
- Update delayed
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalDESCRIPTION
Hpple: A nice Objective-C wrapper on the XPathQuery library for parsing HTML.
Inspired by why the lucky stiff's Hpricot.
CREDITS
Hpple was created by 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 text]; // The text inside the HTML element (the content of the first text node)
[e tagName]; // "a"
[e attributes]; // NSDictionary of href, class, id, etc.
[e objectForKey:@"href"]; // Easy access to single attribute
[e firstChildWithTagName:@"b"]; // The first "b" child node
TODO
- Internal error catching and messages
- CSS3 selectors in addition to XPath
Explore related projects
codecrafters-io/build-your-own-x
Master programming by recreating your favorite technologies from scratch.
560,963 starspublic-apis/public-apis
A collective list of free APIs
497,225 starsmorluto/rea
Reverse engineer anything with agents, from app behavior down to native binaries.
442,786 starsopenclaw/openclaw
The AI that really does things. Any OS. Any Platform. The lobster way. 🦞
394,185 stars