Closed smitron closed 6 months ago
I got it to work using XDocument instead of XMLDocument and XPathNavigator.
string xml =
"<ItemContext>\r\n" +
" <ListContext>6.2.2 Maximum Output Power @ Band7</ListContext>\r\n" +
"</ItemContext>";
XDocument xDoc = XDocument.Parse(xml);
var obj = xDoc.XPath2Select("//ListContext[matches(.,'[0-9]')]/tokenize(., ' ')[1]");`
Hello, would you kindly show me an example of tokenize?
In online xpath testers (freeformatter.com) using the xml below, the xpath2 expression:
//ListContext[matches(.,'[0-9]')]/tokenize(., ' ')[1]"
gives the result of 6.2.2but In the code sample below all results evaluate to null.
Many thanks.