Is there any function that makes string from PHP simpleXMLElement?
No, I wanted to have something exactly opposite. From object to string.
liysd
2010-09-11 12:21:31
I think this is what it does. YOu call the given objects asXML() method and you will get the string representation.
Gunner
2010-09-11 12:36:19
A:
$string = "<element><child>Hello World</child></element>";
$xml = new SimpleXMLElement($string);
$xml->asXML(); //The entire XML tree as a string
$xml->child->asXML(); //Just the child node as a string
Tim Cooper
2010-09-11 12:46:42