• Stars
    star
    2,774
  • Rank 16,415 (Top 0.4 %)
  • Language
    Objective-C
  • License
    MIT License
  • Created almost 16 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An XML/HTML parser for Objective-C, inspired by Hpricot.

Build Status

DESCRIPTION

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.

Contributors

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

More Repositories

1

gruff

Gruff graphing library for Ruby
Ruby
1,363
star
2

calendar_helper

Calendar-generating plugin for Ruby
Ruby
367
star
3

sparklines

Sparkline library for Ruby
Ruby
156
star
4

PeepOpen

Desktop application for switching between files in text editors
Ruby
106
star
5

ar_fixtures

Dumps YAML fixtures from existing data using ActiveRecord
Ruby
69
star
6

zsh-simple

A simple zsh configuration and prompt. See the PeepCode blog below for a graphical example.
Shell
68
star
7

cappuccino-couchdb

A class for working with CouchDB documents from Cappuccino/Objective-J
Objective-J
65
star
8

osxscreenshot

Ruby wrapper for using webkit2png.py to take screenshots of websites programmatically.
Ruby
64
star
9

google-checkout

Experimental Google Checkout gem
Ruby
62
star
10

sinatra-geoip

Simple IP to lat/long API application using the MaxMind GeoLite database.
C
57
star
11

PeepOpen-EditorSupport

Editor-specific plugins for the PeepOpen file chooser application.
Objective-C
52
star
12

topfunky-sparkline-js

Sparkline graph library using Raphael.js
JavaScript
51
star
13

basic_model

A very thin wrapper around CouchRest, for use with CouchDB and Ruby on Rails.
Ruby
51
star
14

hodel_3000_compliant_logger

Alternate logger for Rails that emits syslog-style output. For use with pl_analyze gem.
Ruby
42
star
15

PeepOpen-Issues

Bug reports and feature requests for the PeepOpen application
41
star
16

ruby-hmac

An implementation of the HMAC authentication code in Ruby, originally from Daiki Ueno
Ruby
40
star
17

peepcode-couchdb-code

Demo code for the PeepCode screencast on CouchDB
Ruby
16
star
18

good_form_builder

Form builder for Rails based on Khoi Vinh's Good Form.
Ruby
16
star
19

peepserver

Capistrano tasks for maintaining a CentOS server such as those at RailsMachine hosting.
Ruby
15
star
20

JSLint.tmbundle

The easiest way to syntax check your JavaScript code from TextMate
JavaScript
15
star
21

peepcode-sphinx-address-book

Code project for the PeepCode Thinking Sphinx PDF book.
Ruby
12
star
22

stakeout

Simple Ruby script that watches files and runs a command.
Ruby
12
star
23

merb_static

A Merb plugin that creates a static version of a website, for deployment to any webserver.
Ruby
10
star
24

unobtrusive

Rails generator for installing Dan Webb's lowpro.js and supporting files.
JavaScript
9
star
25

post-receive-hook

Mimics the GitHub web hook for repos hosted elsewhere
Ruby
9
star
26

r-nfl-expected-wins

A data model in R that predicts historical total season wins in the NFL
HTML
8
star
27

stats-js

Cumulative statistical calculations
JavaScript
8
star
28

mosquito

Testing for the Camping micro-web-framework
Ruby
7
star
29

node.couchapp.backbone.demo

Demo application using Node.js, CouchDB and Backbone.js. For the Seattle Backbone.js meetup.
JavaScript
6
star
30

tidy_table

Generate an HTML table from a Ruby object.
Ruby
6
star
31

taskpaper-themes

My custom themes for the Taskpaper note taking application
5
star
32

geddy-coffee-script-demo

Demo app using CoffeeScript with the Geddy web framework for Node.js
JavaScript
5
star
33

demo-simplest-socket-io

Very simple socket.io demo.
JavaScript
5
star
34

CocoaHelpDemo

Demo application for generating bundled help documentation (requires Flying Meat's VoodoPad application)
Objective-C
4
star
35

sparklines-generator

A Rails generator that creates a controller for generating small graphs from a helper.
Ruby
4
star
36

timelog

A personal Markdown-based time tracker with progress bar and category report
Go
4
star
37

Purple-Monkey-Dishwasher

An example of how to use Cucumber and Rack::Test with Sinatra
Ruby
3
star
38

r-nfl-win-probability

An experiment to build an in-game win probability model in R.
R
3
star
39

help.github.com

GitHub help guides
JavaScript
3
star
40

blog-comments

Issues and comments related to the blog at https://www.topfunky.com
2
star
41

demo-vows-callbacks

A demo for Rob Conery. Nothing to see here.
CoffeeScript
2
star
42

bigapp

An application with many files. For testing only.
Ruby
2
star
43

topfunky.github.com

Topfunky's Page
2
star
44

demo-mocha-watch-bug

A demo to show a bug in mocha's --watch option
JavaScript
2
star
45

r-tennis-win-probability

An experiment in building an in-game win probability predictor for tennis matches
R
2
star
46

terraform-intro-demo

Before and after demo code for a Terraform training class
Shell
1
star
47

r-fantasy-experiments

Calculations for fantasy football
HTML
1
star
48

learning-r-stats

Scripts and data while learning to use the R statistics and charting software program
R
1
star
49

katacoda-dev

Experiments with interactive Katacoda tutorials
Makefile
1
star
50

css_graphs

Rails plugin for making HTML markup to display a bar graph.
Ruby
1
star
51

exercism-projects

My personal exercises on exercism.io for learning new languages
Go
1
star
52

hello-demo

Simple Node.js project for demonstrating integration with a CI server.
JavaScript
1
star
53

reviewing-a-pull-request

HTML
1
star