format code and add xml