Akansha
6 Jun 2007, 3:42 AM
Hi,
here is my code which i have written for getting the XML data ------
var RecordDef = Ext.data.Record.create([
{name: 'id'},
{name: 'name'},
{name: 'company'},
{name: 'cost'},
{name: 'desc'}
]);
var myReader = new Ext.data.XmlReader({
record: "row",
}, RecordDef);
var pidValue = RecordDef.get(company);
alert(pidValue);
XML is --
<?xml version="1.0" encoding="UTF-8"?>
<item>
<info>
<id>4</id>
<name>television</name>
<company>philips</company>
<cost>10000</cost>
<desc>color tv</desc>
</info>
</item>
i want to extract info from this XML.I am trying to do it with data record but unable to access it. Can u help in getting back the data.
Thanx in advance
here is my code which i have written for getting the XML data ------
var RecordDef = Ext.data.Record.create([
{name: 'id'},
{name: 'name'},
{name: 'company'},
{name: 'cost'},
{name: 'desc'}
]);
var myReader = new Ext.data.XmlReader({
record: "row",
}, RecordDef);
var pidValue = RecordDef.get(company);
alert(pidValue);
XML is --
<?xml version="1.0" encoding="UTF-8"?>
<item>
<info>
<id>4</id>
<name>television</name>
<company>philips</company>
<cost>10000</cost>
<desc>color tv</desc>
</info>
</item>
i want to extract info from this XML.I am trying to do it with data record but unable to access it. Can u help in getting back the data.
Thanx in advance