JSON to XML should be easy but XML to JSON can not really be done 1 to 1 because of attributes. There is no clear way how to map them. You can establish a mapping for yourself but it will just be a convention on top of JSON.
Are LLMs too expensive, or not reliable enough at not making mistakes, or just something you haven't considered?
It's not something I generally need to do, so I haven't been keeping up with how good LLMs are at this sort of conversion, but seeing your question I was curious so I took a couple of examples from https://www.json.org/example.html and gave them to the default model in the ChatGPT app (GPT 5.2 - at least that's the default for my ChatGPT Plus account) and it seemed to get each of them right on the first attempt.