Select XML node by attribute value

Darth

New Member
\[code\]<location> <hotspot name="name1" X="444" Y="518" /> <hotspot name="name2" X="542" Y="452" /> <hotspot name="name3" X="356" Y="15" /></location>\[/code\]I have a point variable and I need to select the node with its coordinates, then change an attribute value. I want to do something similar to:\[code\]let node = xmld.SelectSingleNode("/location/hotspot[@X='542' @Y='452']")node.Attributes.[0].Value <- "new_name2"\[/code\]but taking attributes value by a variable (variable_name.X / variable_name.Y).
 
Back
Top