protected function createDocument($xmlFile) { $document = new DOMDocument(); $document->preserveWhiteSpace = false; $document->formatOutput = false; $document->loadXml(file_get_contents($xmlFile), LIBXML_NOENT); return $document; }