c# - How to get handle to a specific XElement -


consider have following xml structure:

<root>   <file> a.txt        <version> 1.5 </version>   </file>    <file> b.txt        <version> 1.0 </version>   </file> </root> 

how can handle xelement: <version> 1.0 </version> search? know can search tag function xelement.element(xname) not me.

do want list of version's..here is!

xdocument doc=xdocument.load(yourxml); list<string> lst=doc.descendants()                     .elements("version")                     .select(x=>x.value).tolist(); 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -