one xml file view.xml
convert it into SimpleXMLElement Object after get parent node it's child object need to convert into back in xml format in php
**
View.xml
**
> <cards name="country-cards" model="core_country" title="Country" >
> <field name="name" />
> <field name="code" />
> <template><![CDATA[
> <div class="span12"><strong>{{name}}</strong></div> <div>
> <div class="span8">
> <span>{{name}}<br/>
> {{code}}<br/></span>
> </div></div>]]>
> </template>
> </cards>
**$xml = simplexml_load_file($xmlViewFilePath);**
foreach ($xml as $key=>$value) {
$value want to convert back in to xml formate
}
QUESTION: Any other simple way to achieve SimpleXMLElement Object to XML parsing and store into Database without any I/O operation?
Already used the php conversion mechanism which results in output as null in database link below