fixed xml formatter to work with entity presenter

I'm not sure I have chosen the best solution possible for getting the entity presenter to work with xml but all the tests pass and along with the new test I made for testing the entity presenter with format :xml.