AngleSharp by AngleSharp

<PackageReference Include="AngleSharp" Version="0.9.4" />

 XmlEntityService

public sealed class XmlEntityService : IEntityService, IService
Represents the list of all Xml entities.
using AngleSharp.Services; using System.Collections.Generic; using System.Diagnostics; namespace AngleSharp.Xml { [DebuggerStepThrough] public sealed class XmlEntityService : IEntityService, IService { private readonly Dictionary<string, string> _entities = new Dictionary<string, string> { { "amp", "&" }, { "lt", "<" }, { "gt", ">" }, { "apos", "'" }, { "quot", "\"" } }; public static readonly IEntityService Resolver = new XmlEntityService(); private XmlEntityService() { } public string GetSymbol(string name) { string value = null; if (!string.IsNullOrEmpty(name)) _entities.TryGetValue(name, out value); return value; } } }