How do i get all the stops from this XML? Windows phone

callochurcege

New Member
I have a feed and this is the XML that I get from the feed : All i am intrested in is the routename ( and and the content within the nodes\[code\]<Route z:Id="i1" xmlns="http://schemas.datacontract.org/2004/07/BusExpress.ClassLibrary" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/"><EntityKey z:Id="i2" xmlns="http://schemas.datacontract.org/2004/07/System.Data.Objects.DataClasses" xmlns:a="http://schemas.datacontract.org/2004/07/System.Data"> <a:EntityContainerName>busExpressEntities</a:EntityContainerName><a:EntityKeyValues> <a:EntityKeyMember> <a:Key>routeId</a:Key> <a:Value i:type="b:int" xmlns:b="http://www.w3.org/2001/XMLSchema">1231</a:Value> </a:EntityKeyMember></a:EntityKeyValues><a:EntitySetName>RouteSet</a:EntitySetName></EntityKey><POI /><POILines /><dateEffectiveFrom i:nil="true" /><dateEffectiveTo i:nil="true" /><isLive>true</isLive><relativePosition>0</relativePosition><routeDescription /><routeId>1231</routeId><routeMap /><routeName>1 Whitehawk - Mile Oak</routeName><route_stop><route_stop z:Id="i3"><EntityKey z:Id="i4" xmlns="http://schemas.datacontract.org/2004/07/System.Data.Objects.DataClasses" xmlns:a="http://schemas.datacontract.org/2004/07/System.Data"> <a:EntityContainerName>busExpressEntities</a:EntityContainerName> <a:EntityKeyValues> <a:EntityKeyMember> <a:Key>routeId</a:Key> <a:Value i:type="b:int" xmlns:b="http://www.w3.org/2001/XMLSchema">1231</a:Value> </a:EntityKeyMember> <a:EntityKeyMember> <a:Key>stopId</a:Key> <a:Value i:type="b:int" xmlns:b="http://www.w3.org/2001/XMLSchema">6882</a:Value> </a:EntityKeyMember> </a:EntityKeyValues> <a:EntitySetName>route_stop</a:EntitySetName> </EntityKey> <alightingTariffCode>1</alightingTariffCode> <boardingTariffCode>1</boardingTariffCode> <route z:Ref="i1" /> <routeId>1231</routeId> <routeIndex>1</routeIndex> <routeReference xmlns:a="http://schemas.datacontract.org/2004/07/System.Data.Objects.DataClasses"> <a:EntityKey z:Ref="i2" xmlns:b="http://schemas.datacontract.org/2004/07/System.Data" /> </routeReference> <stop z:Id="i5"> <EntityKey z:Id="i6" xmlns="http://schemas.datacontract.org/2004/07/System.Data.Objects.DataClasses" xmlns:a="http://schemas.datacontract.org/2004/07/System.Data"> <a:EntityContainerName>busExpressEntities</a:EntityContainerName> <a:EntityKeyValues> <a:EntityKeyMember> <a:Key>stopId</a:Key> <a:Value i:type="b:int" xmlns:b="http://www.w3.org/2001/XMLSchema">6882</a:Value> </a:EntityKeyMember> </a:EntityKeyValues> <a:EntitySetName>StopSet</a:EntitySetName> </EntityKey> <AtcoCode>149000006612</AtcoCode> <GPSStopName>Swanborough Dr.</GPSStopName> <Lat>50.8326729229821</Lat> <Long>-0.103217996656901</Long> <LongName>Swanborough Drive</LongName> <NaptanCode>bridmpj</NaptanCode> <OperatorsCode1>06612</OperatorsCode1> <OperatorsCode2>6612</OperatorsCode2> <OperatorsCode3>51581</OperatorsCode3> <OperatorsCode4>bridmpj</OperatorsCode4> <StopName>Swanborough Drive</StopName> <route_stop> <route_stop z:Ref="i3" /> </route_stop> <route_stop_stop /> <route_stop_timetable_stop /> <stopId>6882</stopId> </stop> <stopId>6882</stopId> <stopReference xmlns:a="http://schemas.datacontract.org/2004/07/System.Data.Objects.DataClasses"> <a:EntityKey z:Ref="i6" xmlns:b="http://schemas.datacontract.org/2004/07/System.Data" /> </stopReference></route_stop><route_stop z:Id="i7"> <EntityKey z:Id="i8" xmlns="http://schemas.datacontract.org/2004/07/System.Data.Objects.DataClasses" xmlns:a="http://schemas.datacontract.org/2004/07/System.Data"> <a:EntityContainerName>busExpressEntities</a:EntityContainerName> <a:EntityKeyValues> <a:EntityKeyMember> <a:Key>routeId</a:Key> <a:Value i:type="b:int" xmlns:b="http://www.w3.org/2001/XMLSchema">1231</a:Value> </a:EntityKeyMember> <a:EntityKeyMember> <a:Key>stopId</a:Key> <a:Value i:type="b:int" xmlns:b="http://www.w3.org/2001/XMLSchema">6883</a:Value> </a:EntityKeyMember> </a:EntityKeyValues> <a:EntitySetName>route_stop</a:EntitySetName> </EntityKey> <alightingTariffCode>1</alightingTariffCode> <boardingTariffCode>1</boardingTariffCode> <route z:Ref="i1" /> <routeId>1231</routeId> <routeIndex>2</routeIndex> <routeReference xmlns:a="http://schemas.datacontract.org/2004/07/System.Data.Objects.DataClasses"> <a:EntityKey z:Ref="i2" xmlns:b="http://schemas.datacontract.org/2004/07/System.Data" /> </routeReference> <stop z:Id="i9"> <EntityKey z:Id="i10" xmlns="http://schemas.datacontract.org/2004/07/System.Data.Objects.DataClasses" xmlns:a="http://schemas.datacontract.org/2004/07/System.Data"> <a:EntityContainerName>busExpressEntities</a:EntityContainerName> <a:EntityKeyValues> <a:EntityKeyMember> <a:Key>stopId</a:Key> <a:Value i:type="b:int" xmlns:b="http://www.w3.org/2001/XMLSchema">6883</a:Value> </a:EntityKeyMember> </a:EntityKeyValues> <a:EntitySetName>StopSet</a:EntitySetName> </EntityKey> <AtcoCode>149000006613</AtcoCode> <GPSStopName>Haybourne Road</GPSStopName> <Lat>50.8317788816436</Lat> <Long>-0.10486427645364671</Long> <LongName>Haybourne Road</LongName> <NaptanCode>brimapm</NaptanCode> <OperatorsCode1>06613</OperatorsCode1> <OperatorsCode2>6613</OperatorsCode2> <OperatorsCode3>51701</OperatorsCode3> <OperatorsCode4>brimapm</OperatorsCode4> <StopName>Haybourne Road</StopName> <route_stop> <route_stop z:Ref="i7" /> </route_stop> <route_stop_stop /> <route_stop_timetable_stop /> <stopId>6883</stopId> </stop> <stopId>6883</stopId> <stopReference xmlns:a="http://schemas.datacontract.org/2004/07/System.Data.Objects.DataClasses"> <a:EntityKey z:Ref="i10" xmlns:b="http://schemas.datacontract.org/2004/07/System.Data" /> </stopReference></route_stop></Route>\[/code\]I have the following code to get the URL - \[code\] WebClient client = new WebClient(); client.OpenReadCompleted += new OpenReadCompletedEventHandler(client_OpenReadCompleted); Uri url = new Uri("http://www.buscms.com/brightonbuses/v1/route.aspx?routeid=1231&stops=true&maps=true", UriKind.Absolute); client.OpenReadAsync(url); \[/code\]What's the next stop in this part \[code\]public void client_OpenReadCompleted(object sender, OpenReadCompletedEventArgs e) { } \[/code\]So that I am able to get the stops in the xml that is in the url?
 
Back
Top