public static void recursiveExtractAndRemoveOutOfBandNodes ( @ Nonnull final IHCNode aParentElement , @ Nonnull final List < IHCNode > aTargetList ) { ValueEnforcer . notNull ( aParentElement , "ParentElement" ) ; ValueEnforcer . notNull ( aTargetList , "TargetList" ) ; // Using HCUtils.iterateTree would be too tedious here _recursiveExtractAndRemoveOutOfBandNodes ( aParentElement , aTargetList , 0 ) ; }
Extract all out - of - band child nodes for the passed element . Must be called after the element is finished! All out - of - band nodes are detached from their parent so that the original node can be reused . Wrapped nodes where the inner node is an out of band node are also considered and removed .