请教这个xml如何用simplexml解析,vardump总是false

WBOY
Release: 2016-06-13 12:04:14
Original
1107 people have browsed it

请问这个xml怎么用simplexml解析,vardump总是false

本帖最后由 joebnb 于 2014-08-08 11:22:23 编辑 版主,又来求助了。。。这回事是网页返回的XML数据,我不知道为什么不能用simplexml读取,var_dump显示false

	echo '#########################'.'</br></br>';<br />	var_dump($xml); <br />	echo '#########################';<br />	echo '<br>'.'<br>'.'<br>'.$xml->xsm->nickname;
Copy after login

如果用上面这段直接打印是这样子的:

	echo '#########################'.'</br></br>';<br />	var_dump(simplexml_load_string($xml); <br />	echo '#########################';<br />	echo '<br>'.'<br>'.'<br>'.$xml->xsm->nickname;
Copy after login

用这段代码打印就会显示bool(false)
求解决
------解决方案--------------------
$xml = preg_replace('/!<br><font color='#FF8000'>------解决方案--------------------</font><br>--/', '', $xml);<br />var_dump(simplexml_load_string($xml));
Copy after login

------解决方案--------------------
你光截图是没有用的!
你怎么知道其中没有不可打印的字符呢?
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!