PDA

View Full Version : XmlReader config problem



Robert82
17 Feb 2010, 11:31 PM
Hello guys,

I have a little problem with a nested XML Document.
My XML looks like the following:



<?xml version="1.0" ?>
<document>
<title>title</title>
<author>
<name>Alex</name>
<name>Benno</name>
</author>
<year>1943</year>
<conference>conference</conference>
<keywords>
<word>myKey</word>
<word>myKey2</word>
</keywords>
</document>
and my Store is the following


this.store = new Ext.data.XmlStore({
storeId: 'detailStore',
record: '',
data: data,
fields:[
'title',
'year',
{name: 'author', mapping: 'author > name'},
'conference',
{name: 'keywords', mapping: 'keywords > word'}
]
});
But the store cover only the first argument of author and keywords. How is it possible to get all nested names or words?

EDIT: I have solved the problem. I used the convert function in combination with Ext.DomQuery.

stdunbar
18 Mar 2010, 10:28 AM
Robert82 - is it possible to post a bit more detail about your solution? I'm struggling with the same thing and am not able to make enough progress.