@Nonnull
  @ReturnsMutableCopy
  public static ICommonsList <IHCElement <?>> recursiveGetAllChildrenWithTagName (@Nonnull final IHCNode aOwner,
                                                                                  @Nonnull @Nonempty final EHTMLElement... aElements)
  {
    ValueEnforcer.notNull (aOwner, "Owner");
    ValueEnforcer.notEmpty (aElements, "Elements");

    final ICommonsList <IHCElement <?>> ret = new CommonsArrayList <> ();
    HCHelper.iterateChildrenNonBreakable (aOwner, (aParentNode, aChildNode) -> {
      if (aChildNode instanceof IHCElement <?>)
      {
        final IHCElement <?> aCurrentElement = (IHCElement <?>) aChildNode;
        final String sCurrentTagName = aCurrentElement.getTagName ();
        for (final EHTMLElement aElement : aElements)
          if (sCurrentTagName.equalsIgnoreCase (aElement.getElementName ()))
          {
            ret.add (aCurrentElement);
            break;
          }
      }
    });
    return ret;
  }
@ Nonnull @ ReturnsMutableCopy public static ICommonsList < IHCElement < ? > > recursiveGetAllChildrenWithTagName ( @ Nonnull final IHCNode aOwner , @ Nonnull @ Nonempty final EHTMLElement ... aElements ) { ValueEnforcer . notNull ( aOwner , "Owner" ) ; ValueEnforcer . notEmpty ( aElements , "Elements" ) ; final ICommonsList < IHCElement < ? > > ret = new CommonsArrayList < > ( ) ; HCHelper . iterateChildrenNonBreakable ( aOwner , ( aParentNode , aChildNode ) -> { if ( aChildNode instanceof IHCElement < ? > ) { final IHCElement < ? > aCurrentElement = ( IHCElement < ? > ) aChildNode ; final String sCurrentTagName = aCurrentElement . getTagName ( ) ; for ( final EHTMLElement aElement : aElements ) if ( sCurrentTagName . equalsIgnoreCase ( aElement . getElementName ( ) ) ) { ret . add ( aCurrentElement ) ; break ; } } } ) ; return ret ; }
Helper method to enforce correct element nesting. See
http://www.w3.org/TR/xhtml1#prohibitions

@param aOwner
Owner where to start searching
@param aElements
The tag names to search. May not be <code>null</code>.
@return All elements with the passed element name on any level. Never
<code>null</code>.