When we create a variable of type XDocument to load a xml file, and then use the variable to define XPathSelectElement we get error saying XPathSelectElement is not defined in XDocument.
for example
Assign:
Xdoc = System.Xml.Linq.XDocument.Load(“C:\test.xml”)
Assign
Xdoc.XPathSelectElement results in error.