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

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -