Customizing AEM's OOTB Sitemap to include new attributes in AEMaaCs
We have custimized the AEM's OOTB sitemap by creating new service by extending the ResourceTreeSiteMapGenerator and
overriding addResource() method there. In that service method, I am able to successfully modify the URL and lastModified values. But I have additional requirements to add new attributes in the sitemap (highlighted in blue color). I found that, there is no direct way to do that in the service. I think we can do builder-like API support for these custom extensions which is like creating a few interfaces and classes (just to include a few attributes there). Can somebody confirm if there is any other way?
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>http://www.xyz.org/abc/a1.html</loc>
<data:news>
<news:author>
<news:title>The Example Times</news:name>
<news:language>en</news:language>
</news:author>
</data:news>
</url>
</urlset>