You are here

public function AbstractRenderer::setRootElement in Zircon Profile 8

Same name in this branch
  1. 8 vendor/zendframework/zend-feed/src/Writer/Extension/AbstractRenderer.php \Zend\Feed\Writer\Extension\AbstractRenderer::setRootElement()
  2. 8 vendor/zendframework/zend-feed/src/Writer/Renderer/AbstractRenderer.php \Zend\Feed\Writer\Renderer\AbstractRenderer::setRootElement()
Same name and namespace in other branches
  1. 8.0 vendor/zendframework/zend-feed/src/Writer/Renderer/AbstractRenderer.php \Zend\Feed\Writer\Renderer\AbstractRenderer::setRootElement()

Sets the absolute root element for the XML feed being generated. This helps simplify the appending of namespace declarations, but also ensures namespaces are added to the root element - not scattered across the entire XML file - may assist namespace unsafe parsers and looks pretty ;).

Parameters

DOMElement $root:

File

vendor/zendframework/zend-feed/src/Writer/Renderer/AbstractRenderer.php, line 196

Class

AbstractRenderer

Namespace

Zend\Feed\Writer\Renderer

Code

public function setRootElement(DOMElement $root) {
  $this->rootElement = $root;
}