Hi
I was wondering if we can use Xpath query for finding nodes that ends with a 'string' value entered by the user. For example we can use the following query for finding the nodes that starts with a string
When I tried replacing 'starts -with' with 'ends- with' in the above query, it showed the error below
Namespace Manager or XsltContext needed. This query has a prefix, variable, or user-defined function.
How to write an Xpath query for finding nodes that ends with a particular string? Or is their any other method? I am using ASP.net -C#
Thanks a lot
Kim
I was wondering if we can use Xpath query for finding nodes that ends with a 'string' value entered by the user. For example we can use the following query for finding the nodes that starts with a string
Code:
XmlNodeList nodeList = xmlDoc.SelectNodes("//Country[starts-with(@Name,'a')]");
Namespace Manager or XsltContext needed. This query has a prefix, variable, or user-defined function.
How to write an Xpath query for finding nodes that ends with a particular string? Or is their any other method? I am using ASP.net -C#
Thanks a lot
Kim
Comment