withParentEvents method

Stream<List<XmlEvent>> withParentEvents()

Annotates a stream of XmlEvent objects with parent events. The parent events are thereafter accessible through XmlHasParent.parent.

XmlEndElementEvent are parented to their corresponding XmlStartElementEvent. Throws an XmlTagException is the nesting is invalid.

Implementation

Stream<List<XmlEvent>> withParentEvents() =>
    transform(const XmlWithParentEvents());