code: protected function analyzeWithErrCodeCategoryMsgQuery(SendResult $response, $qErr, $qCat, $qMsg, $errLevel = null)
      {
          $analyzeResponse = new Result($response);
  
          $domXpath = $this->makeDomXpath($response->responseXml);
  
          $errorCodeNodeList = $domXpath->query($qErr);
  
          if ($errorCodeNodeList->length > 0) {
              $analyzeResponse->status = Result::STATUS_ERROR;
  
              $errorCatNode = $domXpath->query($qCat)->item(0);
              if ($errorCatNode instanceof \DOMNode) {
                  $analyzeResponse->status = $this->makeStatusFromErrorQualifier($errorCatNode->nodeValue);
              }
  
              $analyzeResponse->messages[] = new Result\NotOk(
                  $errorCodeNodeList->item(0)->nodeValue,
                  $this->makeMessageFromMessagesNodeList(
                      $domXpath->query($qMsg)
                  ),
                  $errLevel
              );
          }
  
          return $analyzeResponse;
      }
docs: Analyze response by looking for error, category and message with the provided XPATH queries
  
  xpath queries must be prefixed with the namespace self::XMLNS_PREFIX
  
  @param SendResult $response
  @param string $qErr XPATH query for fetching error code (first node is used)
  @param string $qCat XPATH query for fetching error category (first node is used)
  @param string $qMsg XPATH query for fetching error messages (all nodes are used)
  @param string|null $errLevel Optional custom error level string.
  @return Result