NullPointerException in Laser library
a guest Mar 5th, 2014 103 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- ; <ul id="mylist">
- ; <li id="item1"><a href="link1">1</a></li>
- ; </ul>
- (def html
- (l/parse "<ul id=\"mylist\"><li id=\"item1\"><a href=\"link1\">1</a></li></ul>"))
- ; Transformer function for the <ul>. This would do real work in the actual
- ; app, but here we just want to see if the "select" successfully located the
- ; first item in the list.
- (defn mess-with-ul [ul]
- (let [list-item (l/select ul (l/id= "item1"))]
- (println list-item)))
- ; What's wrong with my API usage?
- webapp.layout=> (l/document html (l/id= "mylist") mess-with-ul)
- NullPointerException clojure.zip/branch? (zip.clj:73)
RAW Paste Data