countRepeatInstancesOf method
The number of instances of the repeat xPath (unqualified).
Implementation
int countRepeatInstancesOf(String xPath) {
final reference = getRef(xPath);
if (!reference.isAmbiguous) {
throw StateError('Provided xPath must be ambiguous');
}
return _evaluationContext.expandReference(reference)!.length;
}