PHP-解析完整的html编码的XML

时间:2018-10-24 11:57:51

标签: php xml

Stackoverflow!

我正尝试通过simplexml_load_file解析一个巨大 UTF-8编码的XML文件,该文件充满了html编码-很像æ

非常简单。

<?php

$feed = "test.xml";

if (file_exists($feed)) {
    $xml = simplexml_load_file($feed);
}

它返回一堆错误。

Warning: simplexml_load_file() [function.simplexml-load-file]: test.xml:11: parser error : Entity 'aelig' not defined in ... on line 7

对此有什么可能的解决方法?我无法更改或修改与XML文件相关的任何内容。

0 个答案:

没有答案
相关问题