MetronInfo.Xml
0.1.0
dotnet add package MetronInfo.Xml --version 0.1.0
NuGet\Install-Package MetronInfo.Xml -Version 0.1.0
<PackageReference Include="MetronInfo.Xml" Version="0.1.0" />
<PackageVersion Include="MetronInfo.Xml" Version="0.1.0" />
<PackageReference Include="MetronInfo.Xml" />
paket add MetronInfo.Xml --version 0.1.0
#r "nuget: MetronInfo.Xml, 0.1.0"
#:package MetronInfo.Xml@0.1.0
#addin nuget:?package=MetronInfo.Xml&version=0.1.0
#tool nuget:?package=MetronInfo.Xml&version=0.1.0
MetronInfo.Xml
A .NET library for reading and writing MetronInfo.xml files — the comic/manga metadata
format described by MetronInfo.xsd.
Installation
Not yet published to NuGet.org. Once released:
dotnet add package MetronInfo.Xml
Requirements
- .NET 10 SDK
Project layout
MetronInfo.slnx
MetronInfo.xsd # schema, embedded into the library for validation
src/MetronInfo.Xml/ # the library
MetronInfoXml.cs # Read / Write / Validate entry points
Models/ # POCOs mapped 1:1 to the XSD's types
tests/MetronInfo.Xml.Tests/ # xUnit tests, including a real MetronInfo.xml fixture
Build & test
dotnet build
dotnet test
Usage
Reading
using MetronInfo.Xml;
MetronInfo.Xml.Models.MetronInfo info = MetronInfoXml.Read("MetronInfo.xml");
Console.WriteLine(info.Series.Name);
Console.WriteLine(info.Number);
Read also has overloads for a Stream or TextReader.
Writing
var info = new MetronInfo.Xml.Models.MetronInfo
{
Series = new SeriesType { Name = "Sandman", Volume = 1, StartYear = 1989 },
Number = "1",
AgeRating = AgeRatingType.Mature,
};
MetronInfoXml.Write(info, "MetronInfo.xml");
Write also has overloads for a Stream or TextWriter. Optional elements and attributes
you leave unset are simply omitted from the output.
Write emits the same xmlns:metroninfo, xmlns:xsd, xmlns:xsi, and xsi:schemaLocation
attributes that Metron's own tooling writes, so output stays interoperable with other readers
even though the schema itself declares no target namespace.
Validating
IReadOnlyList<string> errors = MetronInfoXml.Validate("MetronInfo.xml");
if (errors.Count > 0)
{
foreach (var error in errors)
{
Console.WriteLine(error);
}
}
Validate checks the document against the embedded copy of MetronInfo.xsd. It also
separately enforces the "at most one primary=\"true\"" rules on IDS/ID and URLs/URL —
the schema expresses these as XSD 1.1 xs:assert rules, which .NET's built-in XSD 1.0
validator cannot evaluate on its own.
Notes
- Models live under the
MetronInfo.Xml.Modelsnamespace and mirror the schema's element and attribute names. xs:gYear(Series.StartYear) is modeled asint.xs:datefields (CoverDate,StoreDate) and thexs:dateTimefield (LastModified) are modeled asDateTime?.
License
| 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
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 |
|---|---|---|
| 0.1.0 | 54 | 8/5/2026 |