Skip to content
This repository has been archived by the owner on Jun 30, 2021. It is now read-only.

Simplify.Xml

Alexanderius edited this page Sep 1, 2014 · 4 revisions

Provides XML extension functions and XmlSerializator.

Available at NuGet as binary package or source package

XML extensions

// Gets the outer XML string of an XElement (inner XML and itself).
public static string OuterXml(this XElement element);

// Gets the inner XML string of an XElement.
public static string InnerXml(this XElement element);

XML serializer (XmlSerializator)

// Serializes the specified items list to a XML string.
public static string Serialize<T>(IList<T> items);

// Serialize object to XElement.
public static XElement ToXElement<T>(T obj);

// Deserialize XElement to object.
public static T FromXElement<T>(XElement xElement);