Format in XML or JSON

Hi,

I added the support of XML formatting using XStream. I also simplify some method signatures. 
The bad point is that there is no end-to-end test. I will try to write one.

Guillaume