Returns an object of class SimpleXMLElement as a String - anyone?

Hello all,

Anyone knows if there is a way to pass a simplexmlelement object and convert it into a string ?

Thanks,
Márcio

AAhhhhhhhHHHHH!!! GRHHHRHH!!!
yes. Despite the fact that I have open that page several times, it was there the solution.

Sorry.

Anyway:


$xmlObj = simplexml_load_file('RepositorioXml/EppHello.xml');
$xmlString = $xmlObj->asXML();
var_dump ($xmlString);

Is returns a string even if nothing gets printed on the browser because it’s xml data.

I believe I’m ok. And this data is ready to be passed to other methods.

THANKS! :smiley:

SimpleXMLElement::asXML() ?