public List < VoltXMLElement > findChildrenRecursively ( String name ) { List < VoltXMLElement > retval = new ArrayList <> ( ) ; for ( VoltXMLElement vxe : children ) { if ( name . equals ( vxe . name ) ) { retval . add ( vxe ) ; } retval . addAll ( vxe . findChildrenRecursively ( name ) ) ; } return retval ; }
Given a name recursively find all the children with matching name if any .