You are here

public function XMLSitemapWriter::startElement in XML sitemap 6.2

Same name and namespace in other branches
  1. 7.2 xmlsitemap.xmlsitemap.inc \XMLSitemapWriter::startElement()
2 calls to XMLSitemapWriter::startElement()
XMLSitemapWriter::startDocument in ./xmlsitemap.xmlsitemap.inc
XMLSitemapWriter::writeElement in ./xmlsitemap.xmlsitemap.inc
Write full element tag including support for nested elements.

File

./xmlsitemap.xmlsitemap.inc, line 102
XML sitemap integration functions for xmlsitemap.module.

Class

XMLSitemapWriter
Extended class for writing XML sitemap files.

Code

public function startElement($name, $root = FALSE) {
  parent::startElement($name);
  if ($root) {
    foreach ($this
      ->getRootAttributes() as $name => $value) {
      $this
        ->writeAttribute($name, $value);
    }
    $this
      ->writeRaw(PHP_EOL);
  }
}