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
Post a Comment