{"id":1325,"date":"2024-04-08T13:23:03","date_gmt":"2024-04-08T13:23:03","guid":{"rendered":"https:\/\/www.shtros.com\/?p=1325"},"modified":"2024-04-08T13:23:05","modified_gmt":"2024-04-08T13:23:05","slug":"javascript-snippet-for-xml-sitemap","status":"publish","type":"post","link":"https:\/\/www.shtros.com\/javascript-snippet-for-xml-sitemap\/","title":{"rendered":"JavaScript snippet to analyze XML sitemap"},"content":{"rendered":"\n
Trying to make sense of large XML sitemaps isn\u2019t easy. Thankfully, I\u2019ve got your back with the power of JavaScript.<\/p>\n\n\n\n
You can use the snippet below to instantly generate a pivot table showing a breakdown of a website’s path segments based on the URLs found in the XML sitemap. The table can help you identify the sections most popular in a site and its publication date range. It’s useful for your website analysis or carrying out competitor research.<\/p>\n\n\n\n
Open any XML sitemap and run the code below in the DevTools Console Log (CTR+SHIFT+J).<\/p>\n\n\n\n