Christophe Grand a écrit : > Universal and attribute selectors can be easily added. > I added :* (universal), attr= and attr?
[:body :> :*] ; body > * [[:a (attr= :href "http://google.com")]] ; a[href="http://google.com"] [[:a (attr? :href)]] ; a[href] >> 4) Attributes >> Do you have any plans to support setting attributes on elements? >> >> > set-attr and remove-attr > I forgot to paste an example: (deftemplate attr-template "net/cgrand/enlive_html/example.html" [] [:.post] (html/do-> (html/set-attr :title "a post") (html/remove-attr :class) (html/text "replace content"))) Christophe -- Professional: http://cgrand.net/ (fr) On Clojure: http://clj-me.blogspot.com/ (en) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---