textElement function

Matcher<XmlTextEvent> textElement([
  1. Matcher<XmlEvent>? match
])

Wraps another matcher so it only sees XmlTextEvent.

match the matcher to wrap, such as inside

Implementation

Matcher<XmlTextEvent> textElement([Matcher? match]) =>
    ((e) => e is XmlTextEvent && (match == null || match(e)));