Advertisement
Guest User

Untitled

a guest
Jun 21st, 2013
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (ns ennui.core
  2.   (:require [clojure.data.xml :as xml]
  3.             [clojure.zip :as zip]
  4.             [clojure.data.zip.xml :as zipx]))
  5.  
  6. (defn xml-content
  7.   "Returns the contents of the xml node at location loc."
  8.   [loc] ((zip/node loc) :content))
  9.  
  10.  
  11. (defn dump-resources
  12.  "Dump resources from an Evernote file"
  13.  [fname]
  14.   (let [x (xml/parse (java.io.FileReader. (java.io.File. fname)))
  15.         xz (zip/xml-zip x)]
  16.     (zipx/xml-> xz :en-export :note xml-content)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement