Results 1 to 2 of 2

Thread: XmlReader config problem

  1. #1
    Sencha User
    Join Date
    Oct 2009
    Location
    Germany
    Posts
    60

    Default XmlReader config problem

    Hello guys,

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

    Code:
    <?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
    Code:
    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.
    Last edited by Robert82; 18 Feb 2010 at 12:54 AM. Reason: solve the problem

  2. #2
    Ext JS Premium Member
    Join Date
    Jun 2009
    Location
    Superior, CO
    Posts
    20

    Default

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •