Skip to content

It's an efficient XML writer/reader for .NET, and an alternative for XElement.

Notifications You must be signed in to change notification settings

xsoheilalizadeh/xXML

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xXML (Prototype) 🕸

What is xXML?

It's an efficient XML writer/reader for .NET, and an alternative for XElement.

Features

  • Write ✔
  • Read ❌
  • Indented Format ❌
var body = new ReadOnlyElement("Body", new ReadOnlyAttr("xmlns", "http://tempuri.org/"))
{
    ["Origin"] = "THR",
    ["Destination"] = "MHD",
};

var buffer = new ArrayBufferWriter<byte>();

body.WriteTo(buffer);

var xml = Encoding.UTF8.GetString(buffer.WrittenSpan);

Benchmark


|               Method |     Mean |    Error |    StdDev |  Gen 0 | Gen 1 | Gen 2 | Allocated |
|--------------------- |---------:|---------:|----------:|-------:|------:|------:|----------:|
| ReadOnlyElementWrite | 1.830 μs | 2.163 μs | 0.1186 μs | 0.4215 |     - |     - |    1.3 KB |
|        XElementWrite | 4.577 μs | 8.461 μs | 0.4638 μs | 3.9139 |     - |     - |  12.01 KB |

About

It's an efficient XML writer/reader for .NET, and an alternative for XElement.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages