- var_dump: documentation ( source)
- simplexml_load_string: documentation ( source)
- print_r: documentation ( source)
- str_replace: documentation ( source)
<?php
$a = '<?xml version="1.0" encoding="UTF-8"?>
<root a="b">
<row b="y">
<item s="t" />
</row>
<row p="c">
<item y="n" />
</row>
</root>';
$simple_xml = @simplexml_load_string($a);
print_r($simple_xml);
$b = str_replace( array("\n", "\r", "\t"), "", $a );
var_dump($b);
$simple_xml = @simplexml_load_string($b);
print_r($simple_xml);