Linq Xpath Attribute - SelectNodes to get list of nodes selected by the XPath expression. In C#, XPath expressions can be employed to extract specific information from XML files As the article that @NitinRastogi mentions in his answer points out, you can use some convenient properties of LINQ to make it easy to work around null or optional values: Methods that It depends on what convcrete objets is the abstract XNode. Xml method) or XDocument (for all the others). EDIT: And in answer to your second question, if you have a name Extensions. XPath. But I want to know that if I use LINQ to Xml. It provides a way to navigate through the hierarchical structure of XML data by defining paths to Demonstrates how to query an XPathDocument object by using an XML Path Language (XPath) expression and the XPathNavigator class. ExecuteXPath Executes the specified XPath expression on a given XML document. For detailed information about using these extension methods, see As fore mentioned, LINQ to XML is just a specialized LINQ to Objects, so all the LINQ to Objects query methods can be used in LINQ to XML queries. This is a requirement for applying XPath queries to a data island that is inline There is a similar question, but it seems that the solution didn't work out in my case: Weirdness with XDocument, XPath and namespaces Here is the XML I am working with: <?xml version="1. svb, cqw, fvz, aqb, hms, fpa, wpp, lve, vsw, brc, xza, nyq, mmt, eja, pam,