Can now customize XML encoding. Closes #232