A C# implementation of the XML Resolver
  • C# 84.8%
  • HTML 7.2%
  • XSLT 7.1%
  • Shell 0.4%
  • CSS 0.2%
  • Other 0.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Norm Tovey-Walsh adf5c53ad2
All checks were successful
ci/woodpecker/push/branch Pipeline was successful
ci/woodpecker/tag/branch Pipeline was successful
Merge pull request 'Xml Resolver version 6.1.1 released' (#117) from ndw/xmlresolvercs:v611 into main
Reviewed-on: #117
2026-09-05 16:58:13 +02:00
.github/workflows Install both .NET 8 and .NET 10. 2026-01-09 13:31:35 +00:00
.woodpecker Updated for new CI build; various build improvements 2026-05-03 12:30:45 +01:00
data@153159b505 Updated data submodule (just gradle updates) 2026-08-01 07:36:48 +01:00
DataTests Make ByName and GetNames static on ResolverFeature 2026-09-05 08:48:57 +01:00
docker Remove obsolete version from docker-compose.yml 2024-09-20 12:29:29 +01:00
gradle/wrapper XmlResolver version 6.1.0 2026-08-31 09:44:24 +01:00
SampleApp Build and infrastructure upgrades 2026-07-31 08:02:36 +01:00
tools Updated for new CI build; various build improvements 2026-05-03 12:30:45 +01:00
UnitTests Support catalog validation; resolve catalog DTDs locally 2026-09-05 11:46:15 +01:00
XmlResolver Support catalog validation; resolve catalog DTDs locally 2026-09-05 11:46:15 +01:00
XmlResolverData Use data submodule to create data assembly 2024-01-30 14:16:05 +00:00
.gitignore fix gitignore (add .gitignore code from dotnet/roslyn - it handles almost everything) 2026-01-08 23:40:37 +01:00
.gitmodules Updated for new CI build; various build improvements 2026-05-03 12:30:45 +01:00
build.gradle.kts Build and infrastructure upgrades 2026-07-31 08:02:36 +01:00
gradle.properties Xml Resolver version 6.1.1 released 2026-09-05 15:47:29 +01:00
gradlew Build and infrastructure upgrades 2026-07-31 08:02:36 +01:00
gradlew.bat Build and infrastructure upgrades 2026-07-31 08:02:36 +01:00
LICENSE.md Update copyright dates 2023-01-06 08:52:54 +00:00
README.md XmlResolver version 6.1.0 2026-08-31 09:44:24 +01:00
settings.gradle.kts Updated for new CI build; various build improvements 2026-05-03 12:30:45 +01:00
XmlResolver.slnf Updated for new CI build; various build improvements 2026-05-03 12:30:45 +01:00
XmlResolver.slnx Updated for new CI build; various build improvements 2026-05-03 12:30:45 +01:00
XmlResolverData.slnf Updated for new CI build; various build improvements 2026-05-03 12:30:45 +01:00
XmlResolverData.slnx Updated for new CI build; various build improvements 2026-05-03 12:30:45 +01:00

xmlresolvercs

A C# implementation of the XML Resolver

See The XML Resolver Project for more details.

APIs

This API implements System.Xml.XmlResolver.

The resolver can read catalogs from the local filesystem, from ZIP files, or from assemblies bundled with your application.

Version 6.x

Version 6.x is a significant refactoring and is not backwards compatible with version 2.x. (The underlying functionality is the same, but the API is different.) The version 2.x sources are now in the legacy_v2 branch. Important bug fixes will be applied to the 2.x release for some time, but new development is focused on the 6.x release.

Three main considerations drove the refactoring:

  1. Correcting design errors, mostly attempting to make the whole thing more C#-like. The classes are now XmlResolver.XmlResolver… and not Org.XmlResolver….
  2. Simplification of the design (removing the caching feature, for example)
  3. Bringing the Java and C# implementations into better alignment.

What’s changed?(tl;dr)

Where previously you would have instantiated an Org.Xmlresolver.Resolver and used it as the entity resolver for System.Xml.XmlResolver you should now instantiate an XmlResolver.XmlResolver. This new object has methods for performing catalog lookup and resource resolution. It also has a method that returns the System.Xml.XmlResolver resolver API:

XmlResolver.XmlResolver.getXmlResolver()

Behind the scenes, the API has been reworked so that most operations consist of constructing a request for some resource, asking the XmlResolver to either (just) look it up in the catalog or resolve it, and returning a response.

A note about version numbers

The XML Resolver API is often integrated into other projects and products. On the one hand, this means that it’s valuable to publish new releases early so that integrators can test them. On the other hand, integrators quite reasonably want to make production releases with only the most stable versions.

In an effort to make this easier, starting with version 6.x, the XML Resolver releases will use an even/odd pattern version number strategy to identify development and stable branches.

If the second number in the verion is even, that’s a work-in-progress, stabalization release. Please test it, and report bugs. If the second number is odd, that’s a stable release. (Test that and report bugs too, obviously!)

In other words 6.0.x are stabalization releases. When the API is deemed stable, there will be a 6.1.0 release. If more features are developed or significant changes are undertaken, those will be published in a series of 6.2.x releases before stabalizing in a 6.3.0 release. Etc.

ChangeLog

See the change log on xmlresolver.org.

Cloning

The build now includes a collection of schemas and resources that can be made available in a “data” assembly. Because these resources are shared across both the Java and C# projects, they’re in a separate repo and that repo is a “submodule” of this one.

What that means in practice is that after you clone this repository, you must also run:

git submodule sync
git submodule update --init

That will make sure that the submodule is checked out and the data files are available.

Run the Gradle tasks to build the data.

./gradlew make_data_csproj make_data_tests

Loading assembly catalogs

Assembly catalogs are loaded using their AssemblyName, not their path:

  config.SetFeature(ResolverFeature.ASSEMBLY_CATALOGS,
    "MyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null");

You can leave the version out of the name.

Release notes

Releases are being pushed to NuGet.