Sub-sitemaps as object
Opened this issue · 1 comments
mtscarvalho commented
In certain multilingual websites, we utilize a sitemap containing an index of sub-sitemaps. For example:
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>https://mysite.com/en/sitemap.xml</loc>
</sitemap>
<sitemap>
<loc>https://mysite.com/pt-br/sitemap.xml</loc>
</sitemap>
<sitemap>
<loc>https://mysite.com/es/sitemap.xml</loc>
</sitemap>
</sitemapindex>
Is there a method to access these sub-sitemaps individually rather than retrieving all links collectively?
sebi75 commented
In certain multilingual websites, we utilize a sitemap containing an index of sub-sitemaps. For example:
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <sitemap> <loc>https://mysite.com/en/sitemap.xml</loc> </sitemap> <sitemap> <loc>https://mysite.com/pt-br/sitemap.xml</loc> </sitemap> <sitemap> <loc>https://mysite.com/es/sitemap.xml</loc> </sitemap> </sitemapindex>
Is there a method to access these sub-sitemaps individually rather than retrieving all links collectively?
Hey @mtscarvalho! I am building a package inspired by this one, but relying on the newer fast-xml-parser and fewer dependencies, and I would be happy to add such a method to it.
You can check it out here https://github.com/sebi75/lightweight-sitemapper