You are here

public function XMLSitemapWriter::startElement in XML sitemap 7.2

Same name and namespace in other branches
  1. 6.2 xmlsitemap.xmlsitemap.inc \XMLSitemapWriter::startElement()

Start Element.

2 calls to XMLSitemapWriter::startElement()
XMLSitemapWriter::startDocument in ./xmlsitemap.xmlsitemap.inc
Start Document.
XMLSitemapWriter::writeElement in ./xmlsitemap.xmlsitemap.inc
Write full element tag including support for nested elements.

File

./xmlsitemap.xmlsitemap.inc, line 152
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);
  }
}