开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜