I am using C# .
I have an xml node with child nodes as follows :
<PriceID>32</PriceID>
<Store_1> 344</Store_1>
<Store_32> 343 </Store_32>
I would like to select all nodes that start with Store
Is there a way I can do it ?
I know there is a way to select nodes with specific names ..
XmlNodeList xnList = quote.SelectNodes("Store_1");
Does anyone know what will help me ?
You can use Linq2Xml
var xDoc = XDocument.Parse(xmlstring);
var stores = xDoc.Descendants()
.Where(d => d.Name.LocalName.StartsWith("Store"))
.ToList();