PDA

View Full Version : xmlReader and ScriptTagProxy can not read data from url



aggarat
22 Jul 2007, 7:29 AM
I have problem with xmlReader using ScriptTagProxy

Here XML which I get from another url ('http://xxxx.xxx/dictionary.aspx')


<?xml version="1.0" encoding="utf-8" ?>
<dict name="et">
<vocab>art</vocab>
<type>n./vi./</type>
<meaning>คือ, ใช่, เป็น, เป็นอยู่, อยู่ไป||เล่ห์กระเท่ห์, วุฒิสามารถ, ศิลปะ, อุบาย||</meaning>
<phonetic>อาท/</phonetic>
<relatevocab>
<vb>art and part</vb>
<vb>artfully</vb>
<vb>artisan</vb>
<vb>artiste</vb>
<vb>artistically</vb>
<vb>artless</vb>
<vb>artlessness</vb>
<vb>arty</vb>
<vb>artlessly</vb>
<vb>artistry</vb>
</relatevocab>
</dict>


here is my code


var rFormat= parent.Ext.data.Record.create([
{name: 'meaning', mapping: 'meaning'}
]);
var ds = new parent.Ext.data.Store({
proxy: new parent.Ext.data.ScriptTagProxy({
url: 'http://xxxx.xxx/dictionary.aspx'
}),
reader: new parent.Ext.data.XmlReader({
record: 'dict'
},rFormat)
});


I used FireBug to find the bug;

here is error


missing ; before statement
[Break on this error] <dict name="et">\n


Could someone help me?


I spent 3 days to solve this problem but It's still there.

Animal
22 Jul 2007, 7:56 AM
Read carefully: http://extjs.com/deploy/ext-1.1-beta1/docs/output/Ext.data.ScriptTagProxy.html