Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
XmlPersistor.php
Go to the documentation of this file.
1 <?php
7 
12 {
19  public function persist(\SimpleXMLElement $simpleXMLElement, $path)
20  {
21  $dom = new \DOMDocument('1.0');
22  $dom->preserveWhiteSpace = false;
23  $dom->formatOutput = true;
24  $dom->loadXML($simpleXMLElement->asXML());
26  $path,
27  str_replace(
28  ' xmlns:xsi="xsi"', //replace namespace, as we do not need it for xsi namespace
29  '',
30  $dom->saveXML()
31  )
32  );
33  }
34 }
persist(\SimpleXMLElement $simpleXMLElement, $path)