XPS: move some XML parsing to where src/utils is available