Denomica.Sitemap 1.0.0

dotnet add package Denomica.Sitemap --version 1.0.0
                    
NuGet\Install-Package Denomica.Sitemap -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Denomica.Sitemap" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Denomica.Sitemap" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Denomica.Sitemap" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Denomica.Sitemap --version 1.0.0
                    
#r "nuget: Denomica.Sitemap, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Denomica.Sitemap@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Denomica.Sitemap&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Denomica.Sitemap&version=1.0.0
                    
Install as a Cake Tool

Denomica.Sitemap

A library that facilitates discovering and enumerating XML sitemaps on a site.

Main Features

The main features that this library provides are described in the following sections.

Discover URLs in Sitemaps

The SitemapCrawler services attempts to discover all sitemaps defined on a site, and then enumerate all URLs defined in those sitemaps. It supports both standard sitemap files and sitemap index files.

If the URL provided is a sitemap XML file, only that sitemap file is processed. If that sitemap XML file contains references to other sitemap files, those are also processed recursively.

Getting Started

In addition to the Denomica.Sitemap package, you will need to install the Microsoft.Extensions.DependencyInjection Nuget package.

The following code sample demonstrates how to use the SitemapCrawler service to crawl a sitemap and retrieve all URLs defined in it.

using Denomica.Sitemap.Services;
using Microsoft.Extensions.DependencyInjection;

var provider = new ServiceCollection()
	.AddDenomicaSitemap()
	.Services
	.BuildServiceProvider();

var crawler = provider.GetRequiredService<SitemapCrawler>();
await foreach(var pageUrl in crawler.CrawlAsync(new Uri("https://yoursite.com")))
{
	Console.WriteLine(pageUrl.Location);
}

Version Hightlights

v1.0.0

  • The first stable version.
  • Added support for crawling sitemap XML files from the local file system. The CrawlAsync method now accepts a Uri parameter that can be a local file path or a URL.

v1.0.0-beta.4

  • Moved the UrlSetUrl class to the Denomica.Sitemap.Models namespace.
  • Added support for images defined in sitemap files. The UrlsetUrl class now includes an Image property that contains a list of images defined in the sitemap. The Image property is null if no images are defined in the sitemap.

v1.0.0-beta.3

  • Changed the user agent string that the crawler uses.

v1.0.0-beta.2

  • Added support for crawling sitemaps that use an XML namespace other than the default http://www.sitemaps.org/schemas/sitemap/0.9. Many sites seem to incorrectly use a namespace with https prefix.

v1.0.0-beta.1

  • Added overloaded CrawlAsync method that accepts a string parameter to specify the base URL of the site to crawl.

v1.0.0-alpha.2

  • Modified the return type of the CrawlAsync method to return an async enumerable of UrlsetUrl objects.

v1.0.0-alpha.1

  • Initial release of the Denomica.Sitemap package.
  • Provides a SitemapCrawler service that crawls sitemap XML files and returns all URLs defined in them.
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 145 8/21/2025
1.0.0-beta.4 92 8/17/2025
1.0.0-beta.3 120 8/11/2025
1.0.0-beta.1 69 8/3/2025
1.0.0-alpha.2 222 7/26/2025