powershellxpath-2.0

Which version of XPath is installed


I'm using powerShell, and I want to use lower-case() in a XPath.Something like that

//Machines/Machine[lower-case(@FQDN)=lower-case('machine2.mydomain.com')]

The documentation indicate that I need XPath 2.0, how can I check the version of XPath installed on my server?


Solution

  • As of 2012, Microsoft was officially not supporting XPath 2.0 in the .NET Framework (which is what you'll be using from PowerShell, unless you pull in a 3rd-party library) and as recently as last year it was still not happening. Given that they said a decade ago that they weren't going to implement it, and it hasn't happened yet - don't count on it ever happening.

    See XPath and XSLT 2.0 for .NET? for alternatives.