I want to query for an element
<Identifier>var1</Identifier>
inside another element, and the namespace of var1 is
http://schemas.microsoft.com/2011/07/AppServer/Transforms.
I used the statement element.XPathSelectElement({"'//{http://schemas.microsoft.com/2011/07/AppServer/Transforms}Identifier[=var1]');
"{http://schemas.microsoft.com/2011/07/AppServer/Transforms}Identifier" is the toString() returned value from the XName for Identifier.
XPathSelectElement is throwing the below exception:
{“‘//{http://schemas.microsoft.com/2011/07/AppServer/Transforms}Identifier[=var1]’
has an invalid token.”}
.
There is no integration for XName and XPath, either use LINQ to XML methods e.g.
or use the XPath approach with http://msdn.microsoft.com/en-us/library/bb351355.aspx e.g.