Exemple #1
0
\t\t\t\t\t\t\t<p>desc2</p>
\t\t\t\t\t\t</description>
\t\t\t\t\t\t<file></file>
\t\t\t\t\t</attribute>
\t\t\t\t\t<attribute>
\t\t\t\t\t\t<name>third</name>
\t\t\t\t\t\t<description>
\t\t\t\t\t\t\t<p>desc3</p>
\t\t\t\t\t\t</description>
\t\t\t\t\t\t<file></file>
\t\t\t\t\t</attribute>
\t\t\t\t</attributegroup>
\t\t\t</staticattributes>
\t\t\t<photos>
\t\t\t\t<photo mainphoto="1">1.png</photo>
\t\t\t\t<photo mainphoto="0">2.png</photo>
\t\t\t\t<photo mainphoto="0">3.png</photo>
\t\t\t</photos>
\t\t</product>
\t</data>
XML;
print "<pre>";
XML2Array::init();
$aArrayResult = XML2Array::createArray($b);
$aXmlResult = Array2XML::convert($aArrayResult);
print $aXmlResult . "\n\n";
print "<hr>";
$aArrayResult = XML2Array::createArray($aXmlResult);
$aXmlResult = Array2XML::convert($aArrayResult);
print $aXmlResult . "\n\n";
//var_export(XML2Array::createArray($b));
Exemple #2
0
 public static function array2xml($a)
 {
     return Array2XML::convert($a);
 }