Which built-in XPATH function is used to know the run-time size of a data sequence?
-
getCount
-
. count
-
generateGUID
-
num
The count() function in XPath calculates the number of nodes in a node-set or sequence. Option B represents this function. getCount and num are not standard XPath functions, and generateGUID creates unique identifiers.
XPath's built-in count() function returns the number of nodes in a node-set (sequence) at runtime, e.g. count(//book) returns how many book elements matched. It's one of XPath's core node-set functions. 'getCount', 'generateGUID', and 'num' are not standard XPath functions -- generateGUID sounds like it belongs to a different API (e.g. BPEL/XSLT extension functions), and 'num'/'getCount' aren't part of the XPath function library, so count() is the only real answer.