XML解析PHP时出错

时间:2013-11-04 01:29:45

标签: php xml xml-parsing

我正在处理XML文件并且经常出现打击错误。

[03-Nov-2013 19:00:27 UTC] PHP Warning:  SimpleXMLElement::__construct(): Entity: line 83: parser error : Opening and ending tag mismatch: a line 79 and h1 in /home/ihklm/public_html/mydir/xml_theme.php on line 98
[03-Nov-2013 19:00:27 UTC] PHP Warning:  SimpleXMLElement::__construct(): </h1>               in /home/ihklm/public_html/mydir/xml_theme.php on line 98
[03-Nov-2013 19:00:27 UTC] PHP Warning:  SimpleXMLElement::__construct():      ^ in /home/ihklm/public_html/mydir/xml_theme.php on line 98
[03-Nov-2013 19:00:27 UTC] PHP Warning:  SimpleXMLElement::__construct(): Entity: line 152: parser error : Opening and ending tag mismatch: hr line 145 and ul in /home/ihklm/public_html/mydir/xml_theme.php on line 98
[03-Nov-2013 19:00:27 UTC] PHP Warning:  SimpleXMLElement::__construct():       </ul> in /home/ihklm/public_html/mydir/xml_theme.php on line 98
[03-Nov-2013 19:00:27 UTC] PHP Warning:  SimpleXMLElement::__construct():            ^ in 

我尝试了各种各样的东西,但下面没有运气是我的PHP代码

$body = $h->get();    
// echo $body;
$xml = new SimpleXMLElement($body);

任何人都可以分享一些关于我如何解决这个问题的信息。

提前谢谢。

此致 莫纳

0 个答案:

没有答案