日期:2014-05-16  浏览次数:20550 次

ExtJS读取xml数据并显示在GridPanel

Ext.onReady(function(){
??? var MyRecord=Ext.data.Record.create([
?? {name:'name'},
?? {name:'org'},
?? {name:'homepage'}
? ]);
var myReader=new Ext.data.XmlReader({
???? totalRecords:"results",
record:"row",
id:'id'
},MyRecord);
var myProxy=new Ext.data.HttpProxy({
??????????????????????? url: 'hello.xml',
failure:function()
{
???? Ext.Msg.alert("提示","下载数据失败");
???? }
?????????????? });
?
var mystore=new Ext.data.Store({
proxy:myProxy,
reader