• ancestors<T>(name?: null | XName): IterableValueTransform<T, XElement>
  • Returns a function that, for the elements of the source sequence passed to that function, returns the concatenated sequences of ancestors of such elements in reverse document order.

    If a name is provided, the resulting sequence contains only those ancestors having a matching name.

    Returns

    A function that will return a flat sequence of ancestors in reverse document order.

    Type Parameters

    • T extends XNode<T>

      The type of the elements contained in the source sequence.

    Parameters

    • Optional name: null | XName

      The optional name used to filter the sequence of ancestors.

    Returns IterableValueTransform<T, XElement>

Generated using TypeDoc