Michael Maddison
michael at ddisolutions.com.au
Mon Sep 28 22:33:42 CDT 2009
Hi guys, VS2008 C# I've grabbed some XML data from a web service and I need to do some operations on it. This is all new to me and I'm a bit lost trying to follow MSDN docs. The data looks like this. <Data> <Summary MID="SR_20090924"> <VenueName>HAWKESBURY (NSW)</VenueName> <Type>R</Type> <Events>9</Events> <Track>GOOD </Track> <Weather>FINE </Weather> <Races> <Race RID="SR_20090924_01"> <Name>MADE JEWELLERY F&M MDN HCP</Name> <Distance>1400m </Distance> <Class> </Class> <RunnerNo Acceptors="13">13</RunnerNo> <JumpTime>12:10</JumpTime> <TimeToJump>+02:35:19</TimeToJump> <RaceStatus>Betting Open</RaceStatus> </Race> </Summary> <Summary ...> //more </Summary> </Data> I can load the xml using XElement racesFromFile = XElement.Load ( @path ); I need to do a variety of things. How do I get all the Summary Attributes? MID = ? How do I get VenueNAme? And all the raceIDs? Then using LINQ(?) get data specific to a RaceID? Maybe a pointer to a good tutorial would be appreciated. Cheers Michael M