Select XML element based on value of sibling

AB Tidal

New Member
Using Linq to SQL and the example XML document below, how would I get the value of "itemType" where the "itemColor" is blue?\[code\]<?xml version="1.0" encoding="utf-8" ?><items> <item> <itemName>my item name</itemName> <itemType>spoon</itemType> <itemColor>red</itemColor> </item> <item> <itemName>your item name</itemName> <itemType>fork</itemType> <itemColor>blue</itemColor> </item> </items>\[/code\]
 
Back
Top