public function load($source, $contentType, $options = []) { if ($source instanceof \SimpleXMLElement) { $document = new Document(); $document->appendChild($document->importNode(dom_import_simplexml($source), TRUE)); return new Result($document, 'text/xml'); } return NULL; }