View Full Version : Ext.data.Store and XML

15 Jul 2011, 1:31 AM

I'm new with this so sorry if I'm asking stupid questions... :)

I'm trying to get images from xml feed but I don't know how to do it.
Maybe after that I'll try to add carousel to images.

I have tried many combinations from different samples but I just don't get much far from this.
With store.load(); I got xml to the game but now I don't know how to print those xml fields.

Also Javascript debugger in Safari comments this now:
TypeError: Result of expression 'a' [undefined] is not an object.

I hope someone could give me some good tips how to continue with this.

Here is my sample index.html and test.xml I'm using.

<!DOCTYPE html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>XML Test</title>

<script src="lib/touch/sencha-touch.js" type="text/javascript"></script>
<link href="lib/touch/resources/css/sencha-touch.css" rel="stylesheet" type="text/css" />

<script type="text/javascript">

Ext.regModel('Page', {
fields: ['number', 'image_url']

var store = new Ext.data.Store({
model: 'Page',
proxy: {
type: 'ajax',
url : 'test.xml',
reader: {
type: 'xml',
record: 'page'



<?xml version="1.0" encoding="UTF-8"?>