I have a simplexml object loaded with a xml string and I want to print this string in the browser. If I use the asXml() method on the object, I have to view the source of the page to view the xml script. Instead I just want to print it to the browser as a string. How do I do that?
Share
Wrap the output in
htmlspecialchars($xml);.