Neos.ContentRepository/Classes/Domain/Service/ImportExport/NodeExportService.php
public function export($startingPointNodePath = '/', $workspaceName = 'live', \XMLWriter $xmlWriter = null, $tidy = true, $endDocument = true, $resourceSavePath = null, $nodeTypeFilter = null)
    {
        $this->propertyMappingConfiguration = new ImportExportPropertyMappingConfiguration($resourceSavePath);
        $this->exceptionsDuringExport = [];
        $this->exportedNodePaths = [];
        if ($startingPointNodePath !== '/') {
            $startingPointParentPath = substr($startingPointNodePath, 0, strrpos($startingPointNodePath, '/'));
            $this->exportedNodePaths[$startingPointParentPath] = true;
        }

        $this->xmlWriter = $xmlWriter;
        if ($this->xmlWriter === null) {
            $this->xmlWriter = new \XMLWriter();
            $this->xmlWriter->openMemory();
            $this->xmlWriter->setIndent($tidy);
            $this->xmlWriter->startDocument('1.0', 'UTF-8');
        }

        $this->securityContext->withoutAuthorizationChecks(function () use ($startingPointNodePath, $workspaceName, $nodeTypeFilter) {
            $nodeDataList = $this->findNodeDataListToExport($startingPointNodePath, $workspaceName, $nodeTypeFilter);
            $this->exportNodeDataList($nodeDataList);
        });

        if ($endDocument) {
            $this->xmlWriter->endDocument();
        }

        $this->handleExceptionsDuringExport();

        return $this->xmlWriter;
    }
public function export($startingPointNodePath = '/', $workspaceName = 'live', \XMLWriter $xmlWriter = null, $tidy = true, $endDocument = true, $resourceSavePath = null, $nodeTypeFilter = null)
    {
        $this->propertyMappingConfiguration = new ImportExportPropertyMappingConfiguration($resourceSavePath);
        $this->exceptionsDuringExport = [];
        $this->exportedNodePaths = [];
        if ($startingPointNodePath !== '/') {
            $startingPointParentPath = substr($startingPointNodePath, 0, strrpos($startingPointNodePath, '/'));
            $this->exportedNodePaths[$startingPointParentPath] = true;
        }

        $this->xmlWriter = $xmlWriter;
        if ($this->xmlWriter === null) {
            $this->xmlWriter = new \XMLWriter();
            $this->xmlWriter->openMemory();
            $this->xmlWriter->setIndent($tidy);
            $this->xmlWriter->startDocument('1.0', 'UTF-8');
        }

        $this->securityContext->withoutAuthorizationChecks(function () use ($startingPointNodePath, $workspaceName, $nodeTypeFilter) {
            $nodeDataList = $this->findNodeDataListToExport($startingPointNodePath, $workspaceName, $nodeTypeFilter);
            $this->exportNodeDataList($nodeDataList);
        });

        if ($endDocument) {
            $this->xmlWriter->endDocument();
        }

        $this->handleExceptionsDuringExport();

        return $this->xmlWriter;
    }
public function export ( $ startingPointNodePath = '/' , $ workspaceName = 'live' , \ XMLWriter $ xmlWriter = null , $ tidy = true , $ endDocument = true , $ resourceSavePath = null , $ nodeTypeFilter = null ) { $ this -> propertyMappingConfiguration = new ImportExportPropertyMappingConfiguration ( $ resourceSavePath ) ; $ this -> exceptionsDuringExport = [ ] ; $ this -> exportedNodePaths = [ ] ; if ( $ startingPointNodePath !== '/' ) { $ startingPointParentPath = substr ( $ startingPointNodePath , 0 , strrpos ( $ startingPointNodePath , '/' ) ) ; $ this -> exportedNodePaths [ $ startingPointParentPath ] = true ; } $ this -> xmlWriter = $ xmlWriter ; if ( $ this -> xmlWriter === null ) { $ this -> xmlWriter = new \ XMLWriter ( ) ; $ this -> xmlWriter -> openMemory ( ) ; $ this -> xmlWriter -> setIndent ( $ tidy ) ; $ this -> xmlWriter -> startDocument ( '1.0' , 'UTF-8' ) ; } $ this -> securityContext -> withoutAuthorizationChecks ( function ( ) use ( $ startingPointNodePath , $ workspaceName , $ nodeTypeFilter ) { $ nodeDataList = $ this -> findNodeDataListToExport ( $ startingPointNodePath , $ workspaceName , $ nodeTypeFilter ) ; $ this -> exportNodeDataList ( $ nodeDataList ) ; } ) ; if ( $ endDocument ) { $ this -> xmlWriter -> endDocument ( ) ; } $ this -> handleExceptionsDuringExport ( ) ; return $ this -> xmlWriter ; }
Exports the node data of all nodes in the given sub-tree
by writing them to the given XMLWriter.

@param string $startingPointNodePath path to the root node of the sub-tree to export. The specified node will not be included, only its sub nodes.
@param string $workspaceName
@param \XMLWriter $xmlWriter
@param boolean $tidy
@param boolean $endDocument
@param string $resourceSavePath
@param string $nodeTypeFilter Filter the node type of the nodes, allows complex expressions (e.g. "Neos.Neos:Page", "!Neos.Neos:Page,Neos.Neos:Text")
@return \XMLWriter
Exports the node data of all nodes in the given sub - tree by writing them to the given XMLWriter .