@ 2013-11-27T18:49:52Z <?php
$contentData = '<texts><text_0_0><![CDATA[1]]></text_0_0><text_3_0><![CDATA[4]]></text_3_0><text_1_0><![CDATA[2]]></text_1_0><text_4_0><![CDATA[5]]></text_4_0><text_2_0><![CDATA[3]]></text_2_0></texts><medias><image_1_0><![CDATA[http://teste.croobly.com.br/module-content/images/1699789387.jpg]]></image_1_0><image_0_0><![CDATA[http://teste.croobly.com.br/module-content/images/1699802460.jpg]]></image_0_0><image_3_0><![CDATA[http://teste.croobly.com.br/module-content/images/1699734945.jpg]]></image_3_0><image_4_0><![CDATA[http://teste.croobly.com.br/module-content/images/1699720579.jpg]]></image_4_0><image_2_0><![CDATA[http://teste.croobly.com.br/module-content/images/1699775071.jpg]]></image_2_0></medias>';
$dom = new DOMDocument();
$dom->loadXML('<content>'.$contentData.'</content>');
$dom = $dom->getElementsByTagName("medias");
echo $dom->asXML();
/*foreach ($dom as $image) {
$fileName = substr(strrchr($image->nodeValue, "/"), 1);
echo '----------------------';
echo $image->nodeValue, PHP_EOL;
//echo $value, PHP_EOL;
//unlink($path.$fileName);
}*/
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for 7.0.0 - 7.0.20 , 7.1.0 - 7.1.25 , 7.2.0 - 7.2.33 , 7.3.0 - 7.3.33 , 7.4.0 - 7.4.33 , 8.0.0 - 8.0.30 , 8.1.0 - 8.1.28 , 8.2.0 - 8.2.18 , 8.3.0 - 8.3.6 Fatal error: Uncaught Error: Call to undefined method DOMNodeList::asXML() in /in/ELU7P:7
Stack trace:
#0 {main}
thrown in /in/ELU7P on line 7
Process exited with code 255 . Output for 5.0.0 - 5.0.5 , 5.1.0 - 5.1.6 , 5.2.0 - 5.2.17 , 5.3.0 - 5.3.29 , 5.4.0 - 5.4.45 , 5.5.0 - 5.5.35 , 5.6.0 - 5.6.28 Fatal error: Call to undefined method DOMNodeList::asXML() in /in/ELU7P on line 7
Process exited with code 255 . Output for 4.3.2 - 4.3.11 , 4.4.0 - 4.4.9 Fatal error: Cannot instantiate non-existent class: domdocument in /in/ELU7P on line 4
Process exited with code 255 . Output for 4.3.0 - 4.3.1 Fatal error: Cannot instantiate non-existent class: domdocument in /in/ELU7P on line 4
preferences:dark mode live preview
248.41 ms | 401 KiB | 361 Q