EricksonLopez.Xml

dotnet-xml · Mapping & Serialization

On this page (20 sections)

1. Identity, Tier & Maturity Profile#

L3 Persistence & IntegrationsStableMaintenance: ActiveAOT: FullMIT LicenseConfidence: HIGH
Infrastructurenet8.0net9.0net10.0

2. Value Proposition & Problem Solved#

High-performance XSD validation engine with Anti-XXE defaults, thread-safe precompiled schema cache, Result-based errors, and Native AOT support for modern .NET.

Default legacy BCL XML APIs risk XXE injection and throw expensive XmlSchemaValidationException stack unwinds on invalid payloads.

3. Quick Install#

Primary package: EricksonLopez.Xml.Validation

dotnet add package EricksonLopez.Xml.Validation --version 1.0.0

4. Verified Ecosystem Metrics#

v1.0.0
NuGet Published Version
v2.0.0
Repo HEAD Version
257
NuGet Downloads
1
Packable Packages
34
Public API Members
4
Benchmark Rows (RyuJIT)

Snapshot retrieved UTC: 2026-12-01

5. When to Use & When Not to Use#

When to use

  • You validate XML documents against precompiled XSD schemas with Anti-XXE defaults, line/column diagnostics, and Result<bool> outputs.

When NOT to use

  • You are serializing/deserializing JSON payloads—use System.Text.Json source generation.

6. Core Capabilities & Design Invariants#

Anti-XXE & Precompiled Schema Cache

Enforces DtdProcessing.Prohibit and XmlResolver=null with ConcurrentDictionary-backed IXmlSchemaCache.

Multi-Modal Input & Result<bool>

Validates string, Stream, and ReadOnlySpan<byte> inputs returning Result<bool> with IXmlLineInfo coordinates.

7. Included NuGet Packages & Adapters#

Package IDStatusNuGet / LocalTFMsAOT StatusDownloadsDescription
EricksonLopez.Xml.ValidationPrimaryPublishedv1.0.0 / v2.0.0net8.0, net9.0, net10.0AOT: Full257XSD schema validation engine with Anti-XXE protection, precompiled schema cache, structured Result<T> errors, and Microsoft DI integration for .NET.

8. Quick Start Code Example#

Grounded in verified public APIs from EricksonLopez.Xml. Compile with `<ImplicitUsings>disable</ImplicitUsings>` and explicit imports.

using EricksonLopez.Xml.Validation;

var cache = new XmlSchemaCache();
cache.RegisterSchema(
    "https://example.com/orders",
    "<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema' targetNamespace='https://example.com/orders' />");

var validator = new XmlSchemaValidator(cache);

9. Architecture & Dependency Flow#

flowchart LR
  lib_xml["EricksonLopez.Xml (L3)"]
  lib_result["EricksonLopez.Result (L0)"]
  lib_xml --> lib_result
EricksonLopez.Xml Dependency Topology1 upstream library dependencies and 0 downstream dependent libraries verified in dependencies.json.
View accessible text summary and structure

1 upstream library dependencies and 0 downstream dependent libraries verified in dependencies.json.

DirectionLibraryTierRelationship Kinds
UpstreamEricksonLopez.ResultL0Compile-Time, NuGet Package
flowchart LR
  lib_xml["EricksonLopez.Xml (L3)"]
  lib_result["EricksonLopez.Result (L0)"]
  lib_xml --> lib_result

10. Target Frameworks & Native AOT / Trimming Matrix#

MSBuild `.csproj` inspection across 1 packages: 1 Full, 0 Partial, 0 Incompatible, 0 NotApplicable (analyzers/generators).

Package IDIsAotCompatibleEnableTrimAnalyzerVerified AOT StatusTarget Frameworks
EricksonLopez.Xml.ValidationtruetrueFullnet8.0, net9.0, net10.0

11. Upstream Dependencies & Downstream Dependents#

Upstream Dependencies (1)

Downstream Dependents (0)

No other EricksonLopez.* libraries currently depend on this family.

12. Optional Adapters & Third-Party Integrations#

Internal Adapter Edges & Integration Packages

No optional cross-family adapter edges or integration packages are recorded for this library.

Verified External NuGet Dependencies (3)

Microsoft.Extensions.DependencyInjection.AbstractionsMicrosoft.Extensions.Logging.AbstractionsMicrosoft.Extensions.Options

13. Configuration & DI Registration Summary#

Verified DI & Configuration Entry Points

  • XmlValidationServiceCollectionExtensions.AddXmlValidation

    Registers `IXmlSchemaCache` and `IXmlSchemaValidator` as singletons using default `XmlValidationOptions`.

Key Public Types & Contracts

  • EricksonLopez.Xml.Validation.IXmlSchemaCache (interface)

    Defines a thread-safe registry and cache for precompiled XSD schema sets.

  • EricksonLopez.Xml.Validation.IXmlSchemaValidator (interface)

    Defines a contract for validating XML documents against precompiled XSD schemas with Anti-XXE enforcement.

  • EricksonLopez.Xml.Validation.XmlSchemaCache (class)

    Provides a thread-safe cache for precompiled XSD schema sets with Anti-XXE protection.

  • EricksonLopez.Xml.Validation.XmlSchemaCacheExtensions (class)

    Provides extension methods for `IXmlSchemaCache` to support registration of XML schemas from the file system.

  • EricksonLopez.Xml.Validation.XmlSchemaValidator (class)

    Validates XML documents against precompiled XSD schemas while enforcing Anti-XXE protection and structured validation results.

  • EricksonLopez.Xml.Validation.XmlValidationOptions (class)

    Specifies configuration options for XML schema validation behavior.

  • EricksonLopez.Xml.Validation.XmlValidationServiceCollectionExtensions (class)

    Provides extension methods for `IServiceCollection` to register XML schema validation services and caching components.

14. Verified Performance Benchmarks#

All verified measurements below come strictly from `BenchmarkDotNet.Artifacts` running on .NET RyuJIT (0 NativeAOT benchmark runs exist in this snapshot).

Total rows: 4 · Measured: 4 · NA / Error: 0 · Suites: 1

Observed runtimes: .NET 10.0.11 X64 RyuJIT x86-64-v4

Observed CPUs: AMD Ryzen 7 9800X3D 4.70GHz, 1 CPU, 8 logical and 8 physical cores

SuiteMethodRuntimeMean (ns)Allocated (B)Status
XmlValidationBenchmarksCacheLookupContainsSchema.NET 10.0.11 X64 RyuJIT x86-64-v46.2650measured
XmlValidationBenchmarksValidateFromString.NET 10.0.11 X64 RyuJIT x86-64-v43,055.29175,662measured
XmlValidationBenchmarksValidateFromSpan.NET 10.0.11 X64 RyuJIT x86-64-v43,173.613108,593measured
XmlValidationBenchmarksValidateFromStream.NET 10.0.11 X64 RyuJIT x86-64-v43,222.165108,514measured

15. Release History & NuGet vs Repo Status#

Version lag detected: NuGet.org latest published version is v1.0.0, while local repository HEAD is at v2.0.0.

VersionSourcePublished DateSummary
v1.0.0 ↗github2026-09-23Ecosystem Packages in this release | Package | Version | |---------|---------| | `EricksonLopez.Xml.Validation` | `1.0.0` | --- For detailed changes, see [CHANGELOG.md](https://github.com/ericksonlopezf/dotnet-xml/blob/v1.0.0/CHANGELOG.md).
v1.0.0 ↗nuget2026-09-23Published EricksonLopez.Xml.Validation 1.0.0 to NuGet.org.

Libraries in the same tier, architectural layer, or directly paired via dependency edges.

17. Documentation, API Reference & Portal Links#

Per-library conceptual Starlight pages expand in M4; API Reference pages expand in M3.2.

18. Source Repository, License & Contributing#

Released under the MIT License. All assemblies follow EricksonLopez.* build invariants: explicit imports, strong-name signing (`EricksonLopez.snk`), and ASCII author metadata (`Erickson Lopez`).

19. Troubleshooting, Pitfalls & Migration Guidance#

  • Primary package ID is `EricksonLopez.Xml.Validation` (there is no root `EricksonLopez.Xml` NuGet package).
  • Version lag detected: NuGet.org latest published version is v1.0.0, while local repository HEAD is at v2.0.0.

20. Quality & Verification Evidence#

Strong-Name Signing (`EricksonLopez.snk`)
EricksonLopez.snk
`ImplicitUsings=disable`
disable
XML Documentation Extraction
Verified (1 namespaces, 7 types, 34 members)
MSBuild AOT / Trim Attributes
1 Full / 0 Partial / 0 Incompatible / 0 N/A
BenchmarkDotNet Artifacts
4 total (4 measured, 0 na_error)

Explicit Verification Boundaries & Limitations

  • All verified measurements below come strictly from `BenchmarkDotNet.Artifacts` running on .NET RyuJIT (0 NativeAOT benchmark runs exist in this snapshot).

Search EricksonLopez.* Ecosystem

Type a library name, NuGet package ID, .NET type, or architectural concept to search across the portal.