I'm trying to create a section with linq from xml file. my xml file build like this: <root> <Item> <name>a</name> <status>new</status> </Item> <Item> <name>b</name> <status>old</status> </Item> </root> I want to create the section by the following way if the status tag = "new it will create an entry element and if its old it will create a stringelement i thought of something like this new section() { from x in myXdoc.Descendants("Item") where x.element("Status").value == "new" || x.element("Status").value == "old" ?????? }
Cisco Certified Network Associate Exam,640-802 CCNA All Answers ~100/100. Daily update