本规范适用于play framework 2.0.4
@defining(XPath.selectNodes("root/modules", xDoc)){modules=>
@for(module <- modules){
<div class="heading">@module.fullName()</div>
<!-- More processing code -->
}
}
但不再适用于游戏2.1.1
显示的错误是for循环不能迭代NodeList。我想,scala中的某些内容已经从之前的版本中发生了变化。作为一种解决方法,我使用this code将NodeList对象转换为可迭代但仍然失败
如果您能解释此错误的原因以及可能的解决方法,我将不胜感激。