Improve xml support

also ensure that PUT/DELETE are idempotent