get_parent_by_attribute
get_parent_by_attribute($atr_name,$atr_value,$exactly=true); - get the interface of the parent DOM element by its attribute value (available from version 7.0.38)
the input Function accepts parameters:
$attr_name – attribute name (string). $attr_value – attribute value (string). $exactly – exact match of the attribute value when searching for an element (int), by default 1 - the attribute value must completely match the passed parameter ($attr_value). if this parameter is set as 0, the first element whose attribute value contains the specified string will be found ($attr_value). If the value is 2, the search will be performed using the regular expression set in ($attr_value), using the JS function string.search.
After testing, the function returns the result of its work to the script :
DOM element interface – an object that allows you to quickly perform any operations with the found element, the return value type XHEInterface