Smile\ElasticsuiteCore\Search\Request\ContainerConfiguration\BaseConfig\Converter::stripComments PHP Method

stripComments() private method

This method remove all comments of an XML document.
private stripComments ( DOMDocument $source ) : DOMDocument
$source DOMDocument Document to be cleansed.
return DOMDocument
    private function stripComments(\DOMDocument $source)
    {
        $xpath = new \DOMXPath($source);
        foreach ($xpath->query('//comment()') as $commentNode) {
            $commentNode->parentNode->removeChild($commentNode);
        }
        return $source;
    }