public function XMLSitemapWriter::startDocument in XML sitemap 6.2
Same name and namespace in other branches
- 7.2 xmlsitemap.xmlsitemap.inc \XMLSitemapWriter::startDocument()
File
- ./
xmlsitemap.xmlsitemap.inc, line 51 - XML sitemap integration functions for xmlsitemap.module.
Class
- XMLSitemapWriter
- Extended class for writing XML sitemap files.
Code
public function startDocument($version = '1.0', $encoding = 'UTF-8', $standalone = NULL) {
$this
->setIndent(FALSE);
$result = parent::startDocument($version, $encoding);
if (!$result) {
throw new XMLSitemapGenerationException(t('Unknown error occurred while writing to file @file.', array(
'@file' => $this->uri,
)));
}
if (variable_get('xmlsitemap_xsl', 1)) {
$this
->writeXSL();
}
$this
->startElement($this->rootElement, TRUE);
return $result;
}