public void clearChildren() {
        for (SpanNode node : children()) {
            node.setInvalid();
            node.setParent(null);
        }
        children().clear();
        resetCachedFromAndTo();
    }
Removes and invalidates all references to child nodes.
document/src/main/java/com/yahoo/document/annotation/SpanList.java