开发者

printing xml as a string in the browser instead of using asXml() method

开发者 https://www.devze.com 2023-03-14 17:39 出处:网络
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 scri

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?


Wrap the output in htmlspecialchars($xml);.

0

精彩评论

暂无评论...
验证码 换一张
取 消