rewrite xml which will be used to reply