KamiSama.Extensions.Xml
10.0.11.2
See the version list below for details.
dotnet add package KamiSama.Extensions.Xml --version 10.0.11.2
NuGet\Install-Package KamiSama.Extensions.Xml -Version 10.0.11.2
<PackageReference Include="KamiSama.Extensions.Xml" Version="10.0.11.2" />
<PackageVersion Include="KamiSama.Extensions.Xml" Version="10.0.11.2" />
<PackageReference Include="KamiSama.Extensions.Xml" />
paket add KamiSama.Extensions.Xml --version 10.0.11.2
#r "nuget: KamiSama.Extensions.Xml, 10.0.11.2"
#:package KamiSama.Extensions.Xml@10.0.11.2
#addin nuget:?package=KamiSama.Extensions.Xml&version=10.0.11.2
#tool nuget:?package=KamiSama.Extensions.Xml&version=10.0.11.2
KamiSama.Extensions.Xml
Version: 10.0.0
Description
Serialize objects to XML strings and deserialize XML strings using configurable XmlSerializer and XmlWriterSettings instances. Build attribute-driven XmlAttributeOverrides for polymorphic elements and array items.
How to use
dotnet add package KamiSama.Extensions.Xml --version 10.0.0
Use KamiSama.Extensions for both string serialization and polymorphic override helpers. Decorate polymorphic members, discover their concrete types, and pass the resulting serializer to the string helpers:
using System.Xml.Serialization;
using KamiSama.Extensions;
var overrides = new XmlAttributeOverrides();
overrides.AddAutoXmlAttributes(typeof(Document), [typeof(TextContent)]);
var serializer = new XmlSerializer(typeof(Document), overrides);
string xml = document.SerializeToXml(serializer: serializer);
Document? copy = xml.DeserializeFromXml<Document>(serializer);
SerializeToXml and DeserializeFromXml<T> operate on strings. Models must still satisfy the normal XmlSerializer requirements; AutoXmlArrayItemAttribute supports array members, and candidate discovery finds non-abstract subclasses rather than interface implementations.
Namespaces
- KamiSama.Extensions (6 types)
Types
- KamiSama.Extensions.AutoXmlArrayItemAttribute - Marks an array field or property so XML array-item overrides are added for its concrete derived element types. Candidate derived types are supplied when the object graph's overrides are built.
- KamiSama.Extensions.AutoXmlAttribute - Defines the base contract for attributes that add member-specific entries to an
XmlAttributeOverridescollection. Concrete attributes control polymorphic element or array-item mappings. - KamiSama.Extensions.AutoXmlElement<TValue> - Wraps a polymorphic value so its containing XML element can retain a stable name while the nested value uses its concrete type. The implicit conversion makes wrapper creation transparent to callers.
- KamiSama.Extensions.AutoXmlElementAttribute - Marks a field or property so XML-element overrides are added for its concrete derived value types. Collection members are mapped using their item type.
- KamiSama.Extensions.XmlAttributeOverridesExtensions - Provides extension methods that populate
XmlAttributeOverridesfromAutoXmlElementAttributeandAutoXmlArrayItemAttributeannotations. Use the resulting overrides to construct anXmlSerializerfor polymorphic object graphs. - KamiSama.Extensions.XmlSerializationExtensions - Provides extension methods for serializing objects to XML strings and deserializing XML strings. Custom serializers support polymorphic models and other specialized XML mappings.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on KamiSama.Extensions.Xml:
| Package | Downloads |
|---|---|
|
KamiSama.Repositories.Xml
Read-oriented XML directory repository implementations with known serializer and mutation limitations. |
|
|
KamiSama.Iso8583.Protocol
rich ISO 8583 library to parse and compose messages and subset of the iso fields. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 10.0.11.9 | 104 | 8/24/2026 |
| 10.0.11.8 | 103 | 8/21/2026 |
| 10.0.11.7 | 120 | 8/21/2026 |
| 10.0.11.6 | 107 | 8/19/2026 |
| 10.0.11.5 | 105 | 8/18/2026 |
| 10.0.11.4 | 111 | 8/18/2026 |
| 10.0.11.3 | 102 | 8/18/2026 |
| 10.0.11.2 | 103 | 8/18/2026 |
| 10.0.11.1 | 108 | 8/15/2026 |
| 10.0.11 | 112 | 8/11/2026 |
| 10.0.10.2 | 112 | 8/4/2026 |
| 10.0.10.1 | 130 | 7/31/2026 |
| 10.0.10 | 130 | 7/30/2026 |
| 10.0.9 | 136 | 6/20/2026 |
| 10.0.7 | 133 | 5/1/2026 |
| 10.0.6 | 135 | 4/16/2026 |
| 10.0.1 | 270 | 11/26/2025 |
| 10.0.0 | 314 | 11/22/2025 |
| 3.1.6 | 278 | 11/7/2025 |
| 3.1.5 | 273 | 11/6/2025 |