Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Nokogiri for Clojure
Clojure
Branch: master
Pull request Compare This branch is 39 commits behind devn:master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
src/yokogiri
test/yokogiri/test
.gitignore
README.markdown
project.clj

README.markdown

yokogiri

In your project.clj: [yokogiri "1.5.1"]

    (ns myproject.core
      (:require [yokogiri.core :as yokogiri]))

or

    (ns myproject.core
      (:use [yokogiri.core]))

usage

    (def client (yokogiri/make-client))

    (def page (yokogiri/get-page client "http://example.com"))

    ;; xpath
    (def anchor-node-text (map node-text (xpath page "//a")))

    ;; 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

Distributed under the Eclipse Public License, the same as Clojure.

Something went wrong with that request. Please try again.