private function _createDocument ($withUrlSet = true)
	{
		// Create the XML Document
		$document = new \DOMDocument('1.0', 'utf-8');

		// Pretty print for debugging
		if (\Craft::$app->config->general->devMode)
			$document->formatOutput = true;

		if ($withUrlSet)
		{
			$urlSet = $document->createElement('urlset');
			$urlSet->setAttribute(
				'xmlns',
				'http://www.sitemaps.org/schemas/sitemap/0.9'
			);
			$urlSet->setAttribute(
				'xmlns:xhtml',
				'http://www.w3.org/1999/xhtml'
			);
			$document->appendChild($urlSet);
			$this->_urlSet = $urlSet;
		}

		$this->_document = $document;
	}