I want to select the URL value (5.jpg) of the node that has Type=IMAGE and Key=XS ps: the order of the Images nodes is random, so I can't just select the nth node.
What I tried but fails:
Dim root As XmlNode = objXML.DocumentElement
Dim nodeList As XmlNodeList = root.SelectNodes("/Products/Product")
nodeList(i).SelectSingleNode("//URL[../Type='IMAGE' and ../Key='XS']").InnerText
and
nodeList(i).SelectSingleNode("/Images/[Type=IMAGE] and /Images/[Key=XS]").ChildNodes(0).SelectSingleNode("URL").InnerText
<Products>
<Product>
<Id>9200000093797005</Id>
<Images>
<Type>IMAGE</Type>
<Key>XS</Key>
<Url>5.jpg</Url>
</Images>
<Images>
<Type>IMAGE</Type>
<Key>S</Key>
<Url>1.jpg</Url>
</Images>
<Images>
</Product>
</Products>
Already checked here: