Possible Duplicate:
LINQ to XML. How to get some string?
My XML Response look like this.
<Items>
<Item>
<ImageSets>
<ImageSet Category="Primary">
<SwatchImage>
<URL>http://xxx.com/img1.jpg</URL>
<Height Units="pixels">30</Height>
</SwatchImage>
</ImageSet>
<ImageSet Category="Variant">
<SwatchImage>
<URL>http://xxx.com/img2.jpg</URL>
<Height Units="pixels">30</Height>
</SwatchImage>
</ImageSet>
<ImageSet Category="Variant">
<SwatchImage>
<URL>http://xxx.com/img3.jpg</URL>
<Height Units="pixels">30</Height>
</SwatchImage>
</ImageSet>
</ImageSets>
</Item>
</Items>
Now,How can i get the values (URL) of SwatchImage element, If the category name is “Variant” ? Let me know if you need more
information.
getting just the URL values for specific
<ImageSet>nodes should be fairly simple, using the code samples supplied in the link I mentioned above: