custom xml generation to avoid double tags encoding