As per the Sitecore documentation SXA
generates the sitemap according to the XML sitemap format, but the logic for parsing this XML relies on your browser.
You might therefore notice that there are no XML tags displayed in the browser for your sitemap.xml. If you want to display the original XML in your browser, you can install an extension.
Refer this document for more details.
https://doc.sitecore.com/xp/en/developers/sxa/19/sitecore-experience-accelerator/configure-a-sitemap.html
On the other way, if this doesn't resolve your issue then there is a very easy way to customize it.
Create a class named CustomSitemapGenerator.cs
public class CustomSitemapGenerator : Sitecore.XA.Feature.SiteMetadata.Sitemap.SitemapGenerator
{
public CustomSitemapGenerator() : base()
{
}
public CustomSitemapGenerator(XmlWriterSettings xmlWriterSettings) : base(xmlWriterSettings)
{
}
public override string GenerateSitemap(Item homeItem, SitemapLinkOptions sitemapLinkOptions)
{
return GenerateSitemap(homeItem, null, sitemapLinkOptions);
}
public override string GenerateSitemap(Item homeItem, NameValueCollection externalSitemaps, SitemapLinkOptions sitemapLinkOptions)
{
// Custom logic goes here
}
}
Create a config file named Feature.SitemapExtension.Sitemap.config
<?xml version="1.0" encoding="utf-8" ?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<services>
<register
serviceType="Sitecore.XA.Feature.SiteMetadata.Sitemap.ISitemapGenerator, Sitecore.XA.Feature.SiteMetadata" implementationType="Feature.SitemapExtension.Services.CustomSitemapGenerator, Feature.SitemapExtension" lifetime="Transient" patch:instead="register[@implementationType='Sitecore.XA.Feature.SiteMetadata.Sitemap.SitemapGenerator, Sitecore.XA.Feature.SiteMetadata']"/>
</services>
</sitecore>
</configuration>
Refer this for more details.
https://www.vinayjadav.com/posts/customize-sxa-10-sitemap