using System.Xml.Serialization;
using System.Collections.Generic;
[XmlElement(ElementName = "Property", Order = 0)]
public string EmailAddress { get; set; }
[XmlElement(ElementName = "Property", Order = 1)]
public string ExpirationDate { get; set; }
[XmlRoot(ElementName = "Objects")]
[XmlElement(ElementName = "Object")]
public List<ObjectItem> Object { get; set; }
public static void Main()
<?xml version="1.0" encoding="utf-8"?>
<Object Type="System.Management.Automation.PSCustomObject">
<Property Name="EmailAddress" Type="System.String">Anton.Antonov@gamil.com</Property>
<Property Name="ExpirationDate" Type="System.DateTime">21.07.2022 10:54:59</Property>
<Object Type="System.Management.Automation.PSCustomObject">
<Property Name="EmailAddress" Type="System.String">Slavka.Pavlov@mail.r0</Property>
<Property Name="ExpirationDate" Type="System.DateTime">23.02.2021 5:51:59</Property>
XmlSerializer serializer = new XmlSerializer(typeof(Root));
using var reader = new StringReader(xml);
var items = (Root)serializer.Deserialize(reader);
FiddleHelper.WriteTable(items.Object);