Flex - Issues retrieving an XMLList

Posted by BS_C3 on Stack Overflow See other posts from Stack Overflow or by BS_C3
Published on 2010-04-14T16:20:47Z Indexed on 2010/04/14 16:23 UTC
Read the original article Hit count: 440

Filed under:
|
|

Hello!

I'm having a problem retrieving a XMLList and I don't understand why.

I have an application that is running properly. It uses some data from two xml files called division.xml and store.xml. I noticed that I have some data in division.xml that should be in store.xml, so I did a copy/paste of the data from one file to the other. This is the data I copied:

<stores>    
    <store>
        <odeis>101</odeis>
        <name></name>
        <password></password>
        <currency></currency>
        <currSymbol></currSymbol>
    </store>    
    <store>
        <odeis>102</odeis>
        <name></name>
        <password></password>
        <currency></currency>
        <currSymbol></currSymbol>
    </store>
</stores>

In the application, I list all odeis codes and I need to retrieve the block store corresponding to the selected odeis code.

Before moving the data into store.xml, this is how I retrieved the block:

var node:XMLList = divisionData.division.(@name==HomePageData.instance.divisionName).stores.store.(odeis == HomePageData.instance.storeCodeOdeis)

This is how I retrieve it after copying the data into store.xml:

var node:XMLList = storeData.stores.(@name==HomePageData.instance.divisionName).store.(odeis == HomePageData.instance.storeCodeOdeis)

And I'm currently getting the following error:

ReferenceError: Error #1065: The variable odeis is not defined.

Could anyone enlighten me? Cause I really have no clue of why it is not working...

Thanks for any tips you can give.

Regards, BS_C3

© Stack Overflow or respective owner

Related posts about flex

Related posts about xmllist