0
我使用JavaScript的以下行来解析XML字符串转换为XML DOM对象:的Javascript XML解析错误,未关闭的CDATA节
this._xmlParser = new DOMParser();
this._xmlDoc = this._xmlParser.parseFromString(txt,"text/xml");
我的XML字符串如下所示:
<?xml version="1.0"?>
<event>
<id>41717876</id>
<start>2011-08-16T10:16</start>
<end>2011-08-16T10:16</end>
<title>New Calendar Event</title>
<location>
<line>Your location goes here.</line>
</location>
<description>
<line>Your description goes here.</line>
</description>
<!-- %%spider:url%% -->
<further-info><![CDATA[ hello&goodbye ]]></further-info>
<tag>all</tag>
<url>www.google.com</url>
</event>
CDATA节似乎是良好的。为什么我会收到一个解析器错误未封闭CDATA部分?