我的数据最初存储在一个像这样结构的 xml 文件中(有一堆实体,每个实体中的行和每行中的单元格)
<entity i=1>
<row i =1>
<cell i=1>
<cell i=2>
</row>
<row i=2>
<cell i=1>
<cell i=2>
</row>
</entity>
我从 dojo 教程中读到的示例是这样的:
require([
'dojo/store/Memory',
'gridx/Grid',
'gridx/core/model/cache/Sync'
], function(Store, Grid, Cache){
var store = new Store({
data: [
{id: 1, title: 'Hey There', artist: 'Bette Midler'},
{id: 2, title: 'Love or Confusion', artist: 'Jimi Hendrix'},
{id: 3, title: 'Sugar Street', artist: 'Andy Narell'}
]
});
......
});
我应该如何使用 XML 样式表创建 dojo 商店?我应该在我的 XML 样式表中使用嵌入式 javascript 吗?