The input has to be XML, but you can get there via YAML, JSON, tree-sitter etc. And the output doesn't have to be XML.
xsltproc is usually easy to install.