Add support for XML api (BC break!)