protected function createDom($uri, $source = null, array $httpOptions = [])
    {
        return (($source !== null) && strlen(trim($source))) ?
            Dom::createFromString($source) : Dom::createFromUri($uri, $httpOptions);
    }