Permalink
Browse files

Merge pull request #1 from jteneycke/master

Syntax highlighted docs for the win!
  • Loading branch information...
2 parents 35b5812 + 7d49ac6 commit ed437e8aedb4845f639afa0b6fdfcbb288aa7576 @devn committed May 1, 2013
Showing with 10 additions and 6 deletions.
  1. +10 −6 README.markdown
View
@@ -1,18 +1,18 @@
# yokogiri
In your `project.clj`: `[yokogiri "1.5.1"]`
-
+```clojure
(ns myproject.core
(:require [yokogiri.core :as yokogiri]))
-
+```
or
-
+```clojure
(ns myproject.core
(:use [yokogiri.core]))
-
+```
## usage
-
+```clojure
(def client (yokogiri/make-client))
(def page (yokogiri/get-page client "http://example.com"))
@@ -23,7 +23,11 @@ or
;; css
(def footer-feedback-text
(map node-text (css page "div.footer-beta-feedback")))
-
+
+ ;; get specific attributes
+ (def a-attr-href
+ (map #(select-keys % [:href]) (map attr-map (css page "div.link a"))))
+```
## license
Copyright (C) 2012 Devin Walters

0 comments on commit ed437e8

Please sign in to comment.