abloobloo / blahblah.clj
0 likes
0 forks
1 files
Last active
1 | (defn ^String modify-link |
2 | "Takes a DOM tree `document` and a Ring request map `request` as arguments. |
3 | This function will modify the links in <link> tags of <item> elements to point |
4 | to our download proxy. Returns the modified document as a String." |
5 | [document request] |
6 | (let [dom (parse-xml document) |
7 | tfn (doto (make-transformer) |
8 | (.setOutputProperty OutputKeys/INDENT "yes") |
9 | (.setOutputProperty "{http://xml.apache.org/xslt}indent-amount" "2")) |
10 | src (DOMSource. dom) |
Newer
Older