On 05/04/2011 06:23 PM, Alfredo wrote:
<meta name="keywords" content="clojure, is, good" />
I want to extract only the content part.
I recently had related issues, so:
(def metas
(en/html-snippet
"<meta http-equiv=\"Content-Type\" content=\"text/html;
charset=UTF-8\" />
<meta name=\"keywords\" content=\"clojure, is, good\" />"))
(en/select metas [[:meta (en/attr= :name "keywords")]])
(-> (en/select metas [[:meta (en/attr= :name "keywords")]])
first :attrs :content)
--
Thorsten Wilms
thorwil's design for free software:
http://thorwil.wordpress.com/
--
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
Note that posts from new members are moderated - please be patient with your
first post.
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