code: public function xpathValue($strXpathQuery)
      {
  
          $objResult = $this->xpathSingle($strXpathQuery);
  
          if ($objResult === false) {
              return false;
          } elseif ($objResult === null) {
              return null;
          } else {
              return (string)$objResult;
          }
      }
docs: Get a nodevalue from an xpath query returning only one node (single)
  
  @param string $strXpathQuery
  @return static the returning element, NULL if not found, FALSE on error