Namespace Cuemon.Extensions.Xml
Parse streams and byte arrays into XmlReader, escape or sanitize XML text, traverse XmlReader hierarchies, write structured XML with custom element wrappers, and remove XML namespace declarations. Use this namespace when you need comprehensive XML processing without low-level XML API boilerplate. Start with ToXmlReader on Stream or byte[] for XML parsing, or EscapeXml on String for XML-safe text.
Availability: .NET 10, .NET 9 and .NET Standard 2.0
Complements: Cuemon.Xml namespace 📘
Extension Members
| Type | Ext | Methods |
|---|---|---|
| byte[] | ⬇️ | ToXmlReader |
| DateTime | ⬇️ | ToString |
| IHierarchy |
⬇️ | HasXmlIgnoreAttribute, IsNodeEnumerable, GetXmlQualifiedEntity |
| IEnumerable<IHierarchy |
⬇️ | OrderByXmlAttributes<T> |
| XmlWriter | ⬇️ | WriteObject<T>, WriteStartElement, WriteEncapsulatingElementWhenNotNull<T>, WriteXmlRootElement<T>, WriteObject |
| Stream | ⬇️ | ToXmlReader, CopyXmlStream, TryDetectXmlEncoding, RemoveXmlNamespaceDeclarations |
| String | ⬇️ | EscapeXml, UnescapeXml, SanitizeXmlElementName, SanitizeXmlElementText |
| Uri | ⬇️ | ToXmlReader |
| XmlReader | ⬇️ | Chunk, ToHierarchy, ToStream, MoveToFirstElement |
| XmlWriter | ⬇️ | WriteObject<T>, WriteStartElement, WriteEncapsulatingElementWhenNotNull<T>, WriteXmlRootElement<T> |
Classes
ByteArrayExtensions
Extension methods for the byte[].
DateTimeExtensions
Extension methods for the DateTime struct.
HierarchyExtensions
Extension methods for the IHierarchy<T> interface.
StreamExtensions
Extension methods for the Stream class.
StringExtensions
Extension methods for the string class.
UriExtensions
Extension methods for the Uri class.
XmlCopyOptions
Configuration options for XmlWriter.
XmlReaderExtensions
Extension methods for the XmlReader class.
XmlWriterExtensions
Extension methods for the XmlWriter class.