我正在尝试使用libxml_get_errors()来查找XML文件中的任何错误。它确实显示了XML文件中遇到的第一个错误。但是,我希望结果包含文件中每个错误的数组条目。这是我正在运行的代码:
Array
(
[0] => LibXMLError Object
(
[level] => 3
[code] => 9
[column] => 34
[message] => Input is not proper UTF-8, indicate encoding ! Bytes: 0x99 0xA9 0x3C 0x2F
[file] => orderexport_test2.xml
[line] => 1216
)
)
但$ error数组中出现的唯一错误是遇到的第一个错误:
let a = database.ref(this.state.date);
a.child("asd").push("name");
我做错了吗?或者libxml_get_errors()函数是否应该在XML文件中返回EACH错误的数组条目?