Skip to content

Replace the visitor to extract elements #1

@Baptouuuu

Description

@Baptouuuu

Problem

The current Elements visitor returns a Set meaning that it cannot be streamed as every element needs to be kept in memory. This prevents working on large documents that can't fit in memory.

Solution

  • Add a new visitor with the signature All::elements(non-empty-string)(Node): Sequence<Element>
  • Deprecate Elements visitor

The important part of this new visitor is that it returns a Sequence that can be lazy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions