Why is a comma used after the period in certain XPath expressions? Here is an example:
Set nlist = doc.selectNodes("//book/author/first-name[starts-with(.,'M')]")
I tried to search for this with Google, but the literal ""
operators don't seem to like periods or commas.
In XPath the .
mark stands for context node. The context node is usually the same of the current node (current()
function) being processed but it might be situations where it's different. This is not really obvious when you deal with XPath only, but it happens when using XSLT. See this question in SO explaining such a difference.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With