rewrite xml