public function export(array $sites, $tidy = false, $nodeTypeFilter = null)
    {
        $this->xmlWriter = new \XMLWriter();
        $this->xmlWriter->openMemory();
        $this->xmlWriter->setIndent($tidy);

        $this->exportSites($sites, $nodeTypeFilter);

        return $this->xmlWriter->outputMemory(true);
    }