Home > Web Front-end > JS Tutorial > body text

Code for ext to read xml of two structures_YUI.Ext related

WBOY
Release: 2016-05-16 18:59:02
Original
987 people have browsed it



Software 1
1.gif


Control 2
2.gif


This is more common and many examples on the Internet are like this Format, I will also write the main code
var Info= Ext.data.Record.create([
'name', 'icon''
]);
reader=new Ext.data. XmlReader({
record: 'software',
id: 'name'
}, Info);
The following is another format of xml





Main code for reading
var Info= Ext.data.Record.create([
{name: 'name ', mapping: '@name'},
{name: 'icon', mapping: '@icon' }
]);
reader=new Ext.data.XmlReader({
record : 'software',
id: 'name'
}, Info);
ext's help document only has the first way of writing it, and it took me almost two hours to find the second way. The method, I don’t know the reason yet, but it works. I hope an expert can explain it to me. I'm all ears!
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template