1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    21
    Answers
    1
    Vote Rating
    2
    Svinja is on a distinguished road

      0  

    Default Unanswered: Ext.DomQuery attribute selector problem with xml

    Unanswered: Ext.DomQuery attribute selector problem with xml


    Hi,

    i am trying to parse this simple xml:
    HTML Code:
    <?xml version="1.0" encoding="utf-8"?><rss version="2.0">
        <channel>        
            <item>
                <title>Title 1</title>
                <image url="imageUrl">
                    <description>Image description</description>
                </image>
            </item>
        </channel>
    </rss>
    with this code:
    Code:
    Ext.define('MyApp.model.NewsItem', 
    {
        extend: 'Ext.data.Model',
    
    
        config: 
        {
            fields: 
            [
                {name: 'title',  type: 'string'},
                {name: 'imageDescription', type: 'string', mapping:'image>description'},
                {name: 'imageUrl', type: 'string', mapping:'image[url]'}
    
    
            ]
        }
    });
    All is fine except imageUrl is empty. It is interesting that it is empty and not null.
    Reference: http://docs.sencha.com/touch/2-0/#!/api/Ext.DomQuery
    Any help is appreciated.
    Thx.

  2. #2
    Sencha User MD's Avatar
    Join Date
    Mar 2007
    Posts
    178
    Vote Rating
    0
    MD is on a distinguished road

      0  

    Default


    image[url] select 'image' elements that have an attribute named 'url'. So it's just selecting your image node(s), not mapping to the value of the url attribute, which I assume is what you're going for.

  3. #3
    Sencha User
    Join Date
    Mar 2012
    Posts
    21
    Answers
    1
    Vote Rating
    2
    Svinja is on a distinguished road

      0  

    Default


    yes, that was my last attempt, but "image > @url" or "image / @url" should work i think but it doesnt...

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi