Hey everyone,
so I have this project for windows phone i have to do and I have to put some pins on a bing map, but in order to do that I make an API request to google for google places. I get back an XML file and it's like this
<?xml version="1.0" encoding="UTF-8"?>
<PlaceSearchResponse>
<status>OK</status>
<result>
<name>Tetsuya's</name>
<type>restaurant</type>
<type>food</type>
<type>establishment</type>
<formatted_address>529 Kent Street, Sydney NSW, Australia</formatted_address>
<geometry>
<location>
<lat>-33.8750460</lat>
<lng>151.2052720</lng>
</location>
</geometry>
<rating>4.3</rating>
<icon>http://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png</icon>
<reference>CnRmAAAANRC46osWIWF63JgsOdM2XGk22I0x4HxtfL9F_XWMmF3s-ayUyIwvnySqckNlMreu53OqSrX3YsffYOxQh7PYKV2KzI19EqVcBe50qBwmy_vSXoJ3L6ehFYDJTvpHhwAH3b4BFwM8spTOwjOSMeTqhhIQ3LhryZnC4k2F7nKkT9f-8RoUVBwA9UV-C8hHNZh44YkvVOxxtK0</reference>
<id>827f1ac561d72ec25897df088199315f7cbbc8ed</id>
</result>
<result>
<name>Quay</name>
<type>cafe</type>
<type>bar</type>
<type>restaurant</type>
<type>food</type>
<type>establishment</type>
<formatted_address>Upper Level, Overseas Passenger Terminal/5 Hickson Road, The Rocks NSW, Australia</formatted_address>
<geometry>
<location>
<lat>-33.8583790</lat>
<lng>151.2100270</lng>
</location>
</geometry>
<rating>4.1</rating>
<icon>http://maps.gstatic.com/mapfiles/place_api/icons/cafe-71.png</icon>
<reference>CnRiAAAAeNd3Vvz1j9dvz1deiDQWd96zoKYOFMBVhXYbhbZf4A5zfHmMsolsTAH5pd_AJ2jZYOAfCG82yFJLMTMY5-C_Jnic1bsTVud_uTBnJ0JUzD5Q-p0_7_7qYTRfVqBcCKktQ8PGrQquPEl4LfgDa1j3AhIQfkhCpHR9bgfqawWNkbzpqRoUkd7Qatt_OFkX3KKa9K_fxwE2bc4</reference>
<id>f181b872b9bc680c8966df3e5770ae9839115440</id>
</result>
<result>
<name>Rockpool</name>
<type>restaurant</type>
<type>food</type>
<type>establishment</type>
<formatted_address>107 George Street, The Rocks NSW, Australia</formatted_address>
<geometry>
<location>
<lat>-33.8597750</lat>
<lng>151.2085920</lng>
</location>
</geometry>
<rating>4.0</rating>
<icon>http://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png</icon>
<reference>CnRlAAAALuyHKpRN_oLCCfTJZ-uIA7YdJCe3zEhsSf0RZ25GnX6UhQ66gTeVJdGAyfS2bwB3XPvocWSGBfxF-De6bXC3P_Cvezr9kAEW9jBKvazwyyYZoUaZqVwuy4sGlzKOSCse5qDR7snP63sDD1bkV60OGxIQ2zfuqWNJmtiiSXeNFqSgQhoUthzNiDC86p2SIXdpcarNFXRgBLk</reference>
<id>7beacea28938ae42bcac04faf79a607bf84409e6</id>
<event>
<summary>Google Maps Developer Meetup: Rockin' out with the Places API</summary>
<event_id>7lH_gK1GphU</event_id>
<url>https://developers.google.com/places</url>
</event>
</result>
</PlaceSearchResponse>
My problem here is that using LINQ in C# I can access the <result> nodes and use the name and address values as well as the location, but I cannot manipulate the <type> nodes. Specifically, I have tried to select them and every time the same subnode <type> gets selected even though there might be more than one subnodes <type> and when I put its value in a text block the same value appears again and again. Can somebody please help me differentiate the <type> nodes from one another?