c# - What version of XPath does XmlDocument.SelectSingleNode use? -


i'm using xmldocument class this:

divisionsdoc.selectsinglenode(     string.format(@"root/politicaldivisions/politicaldivision[upper-case(@code)='{0}']", withcode.toupper())); 

and resulting in error:

namespace manager or xsltcontext needed. query has prefix, variable, or user-defined function.

i gather due upper-case xpath function, understand exists in xpath 2.0 , not 1.0 (from here, here, etc.)

msdn doesn't specify version of xpath uses. i'm targeting .net 4.5.1 -- wouldn't late enough using xpath 2.0? or defined elsewhere (outside of .net)?

how can find out version of xpath being targeted?

please note, i'm aware of work-around using translate('some text','abcdefghijklmnopqrstuvwxyz','abcdefghijklmnopqrstuvwxyz') -- that's not i'm asking.

microsoft never implemented xpath 2.0 or xslt 2.0... see example uservoice (aptly named native support xpath 2.0 or xslt 2.0 in .net) of 2013...

last comment of march 2015 1 user:

i guess never see world doesn't xml anymore, it's json. shame xml still far better number of key scenarios json.


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -