public function xpathByAttribute($strXpathQuery, $strIndexAttribute = 'name')
    {

        $arrOut = array();
        $objResult = $this->xpath($strXpathQuery);

        foreach ($objResult as $intIndex => $objNode) {
            $strIndex = (string)$objNode->attributes()->$strIndexAttribute;
            $arrOut[$strIndex] = $objResult[$intIndex];
        }

        return $arrOut;
    }