public function exportTables ($xml, $objArchive, $objThemeId)
	{

		// Find tables node
		$tables = $xml->getElementsByTagName('tables')[0];
		
		// Add the table (elements)
		$table = $xml->createElement('table');
		$table->setAttribute('name', 'tl_elements');
		$table = $tables->appendChild($table);

		// Load the DCA
		$this->loadDataContainer('tl_elements');

		// Get the order fields
		$objDcaExtractor = \DcaExtractor::getInstance('tl_elements');
		$arrOrder = $objDcaExtractor->getOrderFields();

		// Get all content blocks
		$objContentBlocks = $this->Database->prepare("SELECT * FROM tl_elements WHERE pid=?")
										->execute($objThemeId);

		// Add the rows
		while ($objContentBlocks->next())
		{
			$this->addDataRow($xml, $table, $objContentBlocks->row(), $arrOrder);
		}

		$objContentBlocks->reset();
		
		
		// Add the child table (pattern)
		$table = $xml->createElement('table');
		$table->setAttribute('name', 'tl_pattern');
		$table = $tables->appendChild($table);

		// Load the DCA
		$this->loadDataContainer('tl_pattern');

		// Get the order fields
		$objDcaExtractor = \DcaExtractor::getInstance('tl_pattern');
		$arrOrder = $objDcaExtractor->getOrderFields();

		// Add pattern recursively
		while ($objContentBlocks->next())
		{
			$this->addPatternData($xml, $table, $arrOrder, $objContentBlocks->id);
		}
	}