Sorry if this is a stupid question but I am new to WP7 development (and C# in general).
I have an XML file that looks like this:
<sessions>
<session id="305">
<startdatetime>2012-09-12 09:30:00</startdatetime>
<enddatetime>2012-09-12 10:30:00</enddatetime>
<name>TEST</name>
<description>[text]</description>
<venueID>19</venueID>
<speakerID>1764,2077,2361</speakerID>
</session>
<session> ... </session>
<session> ... </session>
etc.`
</sessions>
Later in the XML there are nodes for venues and speakers, I can pull the venue out fine using
var venuedata = from query in loadedData.Descendants("venues").Descendants("venue")
where query.Attribute("id").Value == session.venueID
select new Venue
{
[stuff]
};
[etc]
But how do I do the same thing when the XML contains a comma-seperated list like the speakers in this case?
Thanks.
Use string.Split to extract the comma-separated value: http://msdn.microsoft.com/en-us/library/system.string.split.aspx