【发布时间】:2012-04-26 05:04:13
【问题描述】:
XML:
<?xml version="1.0"?>
<choices>
<choice>
<start>39</start>
<duration>6</duration>
<path>
<name></name>
<complete></complete>
</path>
<path>
<name></name>
<complete></complete>
</path>
</choice>
</choices>
$.ajax({
url: 'choices.xml',
context: this,
async: false,
success: function(response) {
var xmlDoc = $.parseXML(response);
console.log(xmlDoc); // null
}
});
XML 被报告为有效,并且没有引发错误。我知道我可以使用 $(response),但我不需要它。
- jQuery 1.7.2
【问题讨论】:
标签: jquery html null xml-parsing