Internally, uses associative arrays instead of Domain Models for performance reasons, so "nodeData" in this class is always an associative array.
 /**
  * @test
  */
 public function aSingleNodeExportedWithNodeDataExportCanBeImportedWithNodeDataImport()
 {
     $originalNode = $this->rootNode->createNode('foo', $this->nodeTypeManager->getNodeType('Neos.ContentRepository.Testing:ImportExport'));
     $originalNode->setProperty('description', 'Some node with a property');
     $originalNode->setProperty('someDate', new \DateTime());
     $this->persistenceManager->persistAll();
     $exportService = new NodeExportService();
     $xml = $exportService->export('/')->outputMemory();
     $this->nodeDataRepository->removeAll();
     $this->workspaceRepository->removeAll();
     $this->saveNodesAndTearDownRootNodeAndRepository();
     $this->setUpRootNodeAndRepository();
     $importService = new NodeImportService();
     $reader = new \XMLReader();
     $reader->XML($xml);
     $importService->import($reader, '/');
     $importedNode = $this->rootNode->getNode('foo');
     $this->assertNotNull($importedNode, 'Expected node not found');
     $this->assertSame($originalNode->getIdentifier(), $importedNode->getIdentifier());
     $this->assertSame($originalNode->getProperty('description'), $importedNode->getProperty('description'));
     $this->assertEquals($originalNode->getProperty('someDate'), $importedNode->getProperty('someDate'));
 }
 /**
  * Imports one or multiple sites from the XML file at $pathAndFilename
  *
  * @param string $pathAndFilename
  * @return Site The imported site
  * @throws UnknownPackageException|InvalidPackageStateException|NeosException
  */
 public function importFromFile($pathAndFilename)
 {
     /** @var Site $importedSite */
     $site = null;
     $xmlReader = new \XMLReader();
     $xmlReader->open($pathAndFilename, null, LIBXML_PARSEHUGE);
     if ($this->workspaceRepository->findOneByName('live') === null) {
         $this->workspaceRepository->add(new Workspace('live'));
         $this->persistenceManager->persistAll();
     }
     while ($xmlReader->read()) {
         if ($xmlReader->nodeType != \XMLReader::ELEMENT || $xmlReader->name !== 'site') {
             continue;
         }
         $site = $this->getSiteByNodeName($xmlReader->getAttribute('siteNodeName'));
         $site->setName($xmlReader->getAttribute('name'));
         $site->setState((int) $xmlReader->getAttribute('state'));
         $siteResourcesPackageKey = $xmlReader->getAttribute('siteResourcesPackageKey');
         if (!$this->packageManager->isPackageAvailable($siteResourcesPackageKey)) {
             throw new UnknownPackageException(sprintf('Package "%s" specified in the XML as site resources package does not exist.', $siteResourcesPackageKey), 1303891443);
         }
         if (!$this->packageManager->isPackageActive($siteResourcesPackageKey)) {
             throw new InvalidPackageStateException(sprintf('Package "%s" specified in the XML as site resources package is not active.', $siteResourcesPackageKey), 1303898135);
         }
         $site->setSiteResourcesPackageKey($siteResourcesPackageKey);
         $rootNode = $this->contextFactory->create()->getRootNode();
         // We fetch the workspace to be sure it's known to the persistence manager and persist all
         // so the workspace and site node are persisted before we import any nodes to it.
         $rootNode->getContext()->getWorkspace();
         $this->persistenceManager->persistAll();
         $sitesNode = $rootNode->getNode(SiteService::SITES_ROOT_PATH);
         if ($sitesNode === null) {
             $sitesNode = $rootNode->createNode(NodePaths::getNodeNameFromPath(SiteService::SITES_ROOT_PATH));
         }
         $this->nodeImportService->import($xmlReader, $sitesNode->getPath(), dirname($pathAndFilename) . '/Resources');
     }
     if ($site === null) {
         throw new NeosException(sprintf('The XML file did not contain a valid site node.'), 1418999522);
     }
     $this->emitSiteImported($site);
     return $site;
 }