using System.Xml.Serialization;
using System.Collections.Generic;
[XmlRoot(ElementName = "Row")]
[XmlElement(ElementName = "ShiftID")]
public string ShiftID { get; set; }
[XmlElement(ElementName = "EmployeeID")]
public string EmployeeID { get; set; }
[XmlRoot(ElementName = "Rows")]
[XmlElement(ElementName = "Row")]
public List<Row> Row { get; set; }
[XmlRoot(ElementName = "Table")]
[XmlElement(ElementName = "Rows")]
public Rows Rows { get; set; }
[XmlAttribute(AttributeName = "SourceQuery")]
public string SourceQuery { get; set; }
[XmlRoot(ElementName = "Tables")]
[XmlElement(ElementName = "Table")]
public Table Table { get; set; }
public static void Main()
"<Tables><Table SourceQuery=\"Transaction\"><Rows><Row><ShiftID></ShiftID><EmployeeID>ANDREW</EmployeeID><StartDateTime>02/11/2018 10:30:00</StartDateTime><EndDateTime>02/11/2018 19:00:00</EndDateTime><ShiftCost></ShiftCost><Break>30</Break><Location>Main Bar</Location><Type></Type></Row></Rows></Table></Tables>";
var stringReader = new StringReader(xmlText);
var serializer = new System.Xml.Serialization.XmlSerializer(typeof(Tables));
var neededObject = serializer.Deserialize(stringReader) as Tables;
var rows = neededObject.Table.Rows.Row;
foreach(var item in rows)
Console.WriteLine(item.EmployeeID);