BasicPath.GlobalOccurrenceNumber

public static final class GlobalOccurrenceNumber

Not to be used directly, but through the utility functions: firstOccurrenceOf(Path), lastOccurrenceOf(Path), occurrenceNumber(Integer)

Constructors

GlobalOccurrenceNumber

GlobalOccurrenceNumber(Integer n)

Methods

of

public Path of(Path path)

return the nth global occurrence (in the entire document) of the given path.

Parameters:
  • path – the element to find
Returns:

a new Path instance, that adds the global occurrence constraint to it