public function trimXmlString($xmlString)
    {
        $xmlString = preg_replace('/[\r\n]+(?![^(]*\))/', '', $xmlString);
        $xmlString = preg_replace('/[\s]{2,}/', ' ', $xmlString);
        $xmlString = str_replace(["\r\n", "\n"], '', $xmlString);

        return trim($xmlString);
    }