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

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -