I have the following XML:
<MovieRunTimes>
<ShowDate>6/9/2012</ShowDate>
<ShowTimesByDate xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<a:string>12:25</a:string>
<a:string>17:30</a:string>
<a:string>22:35</a:string>
</ShowTimesByDate>
<TicketURI>http://www.fandango.com/tms.asp?t=AANCC&m=112244&d=2012-06-09</TicketURI>
</MovieRunTimes>
And the following C# class:
public class MovieRunTimes
{
[XmlElement("ShowDate")]
public string ShowDate { get; set; }
[XmlElement("TicketURI")]
public string TicketUri { get; set; }
[XmlArray("ShowTimesByDate", Namespace = "http://schemas.microsoft.com/2003/10/Serialization/Arrays")]
public List<string> ShowTimesByDate { get; set; }
}
Unfortunately the ShowTimesByDate is empty after I deserialize. If I remove the namespace from the ShowTimesByDate element and the prefix from the string element, then it deserializes fine. How do I correctly use the namespace to deserialize the XML?