To implement bamboo plugins as hack middleware, I have to do XML processing in Haskell ... omg!
After a little search I found this tutorial. It's clear and well written, I was amazed.
This kind of thing is still much faster in Ruby. nokogiri and hpricot rules.