返回时出现xml格式错误

时间:2010-11-19 01:32:58

标签: flex flash actionscript-3

我得到了TypeError: Error #1088: The markup in the document following the root element must be well-formed.

但是这个字符串的输出对我来说是正确的。

<midifile>C:\Users\XYZ\Desktop\white_night_in_G.mp3</midifile>
<resolution>240</resolution>
<tick>77767</tick>
<ttrack>5</ttrack>
<tpatches>0</tpatches>
<tduration>226.063</tduration>


var xmlResults:XML = new XML(message);
xmlResults.ignoreWhite = true;

1 个答案:

答案 0 :(得分:3)

是整个xml标记吗?你错过了一个根标签。试试

<item>
<midifile>C:\Users\XYZ\Desktop\white_night_in_G.mp3</midifile>
<resolution>240</resolution>
<tick>77767</tick>
<ttrack>5</ttrack>
<tpatches>0</tpatches>
<tduration>226.063</tduration>
</item>