how to replace domain name in sitemap.xml file ?
my xml format =>
https://www.myold-domain.com/v/hg
replace domain to =>
https://www.mynew-domain.co.il/v/hg
I have not tried it myself on xml, but the HTMLRewriter API should be able to do this. There is an example to do pretty much exactly what your are asking on this blog post: