c# - select all xml child nodes that start with a string -
i using c# .
i have xml node child nodes follows :
<priceid>32</priceid> <store_1> 344</store_1>       <store_32> 343 </store_32> i select nodes start store
is there way can ?
i know there way select nodes specific names ..
  xmlnodelist xnlist = quote.selectnodes("store_1"); does know me ?
you can use linq2xml
var xdoc = xdocument.parse(xmlstring); var stores = xdoc.descendants()             .where(d => d.name.localname.startswith("store"))             .tolist(); 
Comments
Post a Comment