Class BodyNode

  • All Implemented Interfaces:
    Iterable<Node>

    public class BodyNode
    extends TagNode
    Represents the root of a HTML document.
    • Constructor Detail

      • BodyNode

        public BodyNode()
    • Method Detail

      • getMinimalDeletedSet

        public List<Node> getMinimalDeletedSet​(long id)
        Description copied from class: TagNode

        This recursive method considers a descendant deleted if all its children had TextNodes that now are marked as removed with the provided id. If all children of a descendant is considered deleted, only that descendant is kept in the collection of the deleted nodes, and its children are removed from the collection of the deleted nodes.
        The HTML tag nodes that never had any text content are never considered removed

        It actually might have nothing to do with being really deleted, because the element might be kept after its text content was deleted.
        Example:
        table cells can be kept after its text content was deleted
        horizontal rule has never had text content, but can be deleted

        Overrides:
        getMinimalDeletedSet in class TagNode