6

I want to automate filling in data on a website using clojure.

For this I want to query elements of webpages and create http requests. I have been looking at using HttpUnit and contrib.clojure.zip-filter.xml. So far neither approach feels right.

Are there alternative libraries to aid with this task?

thanks

Peter Tillemans
  • 34,983
  • 11
  • 83
  • 114

1 Answers1

7

Seems like the perfect use case for Enlive (characterised by the author -- Christophe Grand -- as "a selector-based (à la CSS) templating and transformation system for Clojure").

See e.g. the How to select nth element of particular type in enlive? SO question -- and my answer to it -- for an example of use. For more in-depth information, there's David Nolen's excellent tutorial.

Community
  • 1
  • 1
Michał Marczyk
  • 83,634
  • 13
  • 201
  • 212
  • Not that you couldn't use zippers... Here's another SO question which might be relevant if you choose to go the zipper route: http://stackoverflow.com/questions/2872921/insertions-into-zipper-trees-on-xml-files-in-clojure – Michał Marczyk May 27 '10 at 00:44
  • Enlive rocks. Highly recommend it. Zippers would be my second choice but Enlive is way better than a zipper. – Jeremy Wall May 27 '10 at 02:38