You are here

public function AbstractEntry::saveXml in Zircon Profile 8

Same name in this branch
  1. 8 vendor/zendframework/zend-feed/src/Reader/AbstractEntry.php \Zend\Feed\Reader\AbstractEntry::saveXml()
  2. 8 vendor/zendframework/zend-feed/src/Reader/Entry/AbstractEntry.php \Zend\Feed\Reader\Entry\AbstractEntry::saveXml()
Same name and namespace in other branches
  1. 8.0 vendor/zendframework/zend-feed/src/Reader/Entry/AbstractEntry.php \Zend\Feed\Reader\Entry\AbstractEntry::saveXml()

Get entry as xml

Return value

string

File

vendor/zendframework/zend-feed/src/Reader/Entry/AbstractEntry.php, line 123

Class

AbstractEntry

Namespace

Zend\Feed\Reader\Entry

Code

public function saveXml() {
  $dom = new DOMDocument('1.0', $this
    ->getEncoding());
  $deep = version_compare(PHP_VERSION, '7', 'ge') ? 1 : true;
  $entry = $dom
    ->importNode($this
    ->getElement(), $deep);
  $dom
    ->appendChild($entry);
  return $dom
    ->saveXml();
}