I am using .NET 4.0 and I would like to use XPath 2.0 methods such as ([Matches()][1], [upper-case()][2], [lower-case()][3]) when trying to find elements in a document.
Example XPath: "/MyDocument/MyNode[matches(@MyAttribute, 'MyValue', 'i')]"
I have tried using:
System.Xml.XPath.XPathNavigator.Compile()
System.Xml.XmlDocument.SelectNodes()
System.Xml.Linq.XDocument.SelectElements()
But I basically throw the exception "UndefinedXsltContextException" (or something similar). Can this be done in .NET 4.0 and if so can you provide a small example on how to set it up to work?
Thanks