syntax error xml linq query

Goos2000

New Member
i want query a file xml with linq,i want get all descendat of SubLayers which has the name SubLayer and has an attribute which is called "Where"how do i write this query in linq ?i wrote it in this way:\[code\] var query3 = from c in xmlFile.Descendants("SubLayers").Elements("SubLayer").Where(c.Attribute("where" != null)) select c;\[/code\]but it say that i can't use \[code\] c\[/code\]in the \[code\] where condition.\[/code\]how do i write it ??
 
Back
Top