add encode formatter to xml