我有一個很大的問題(至少對我來說))與SimpleXML分析器。錯誤是:PHP SimpleXML錯誤
Warning: simplexml_load_file(): file.meta:16: parser error : StartTag: invalid element name in index.php on line 89
Warning: simplexml_load_file(): <335> in index.php on line 89
Warning: simplexml_load_file():^in index.php on line 89
Warning: simplexml_load_file(): file.meta:18: parser error : expected '>' in index.php on line 89
Warning: simplexml_load_file(): in index.php on line 89
Warning: simplexml_load_file():^in index.php on line 89
Warning: simplexml_load_file(): file.meta:18: parser error : Opening and ending tag mismatch: Sequence line 15 and unparseable in index.php on line 89
Warning: simplexml_load_file(): in index.php on line 89
Warning: simplexml_load_file():^in index.php on line 89
Warning: simplexml_load_file(): file.meta:19: parser error : StartTag: invalid element name in index.php on line 89
Warning: simplexml_load_file(): <337> in index.php on line 89
Warning: simplexml_load_file():^in index.php on line 89
Warning: simplexml_load_file(): file.meta:21: parser error : expected '>' in index.php on line 89
Warning: simplexml_load_file(): in index.php on line 89
Warning: simplexml_load_file():^in index.php on line 89
Warning: simplexml_load_file(): file.meta:21: parser error : Opening and ending tag mismatch: MetaAttack line 2 and unparseable in index.php on line 89
Warning: simplexml_load_file(): in index.php on line 89
Warning: simplexml_load_file():^in index.php on line 89
Warning: simplexml_load_file(): file.meta:21: parser error : Extra content at the end of the document in index.php on line 89
Warning: simplexml_load_file(): in index.php on line 89
Warning: simplexml_load_file():^in index.php on line 89
Warning: Invalid argument supplied for foreach() in index.php on line 97
我已經使用了它,但沒有得到任何東西。我也搜索了XML標籤聲明(也許它禁止聲明一個數字標籤),但什麼也沒找到。下面你可以找到我的XML(.META)文件:
<?xml version="1.0"?>
<MA>
<Count>
3
</Count>
<Duration>
34
</Duration>
<End>
1315815814
</End>
<Start>
1315815780
</Start>
<Sequence>
<335>
1315815794
</335>
<337>
1315815814
</337>
<336>
1315815804
</336>
</Sequence>
</MA>
在線89:
$ma = simplexml_load_file("file.meta");
任何答案是讚賞。提前致謝。 ;)