I try writing two comboboxes to facilitate selection of the following XML,

<data>
        <state label="Texas" data="Texas">
                <county label="Jones" data="123" />
                <county label="Taylor" data="124" />
                ...
        </state>
        <state label="Virginia" data="Virginia">
                <county label="Alexandria" data="223" />
                <county label="Arlington" data="224" />
                ...
        </state>
        ...


The first combo box is named _combo1 that is populated by state data, and I
want to get an XML or XMLList of the counties using AS3, I wonder whether I
can write it in E4X syntax that looks somewhat like

        var selected:String = _combo1.selectedItem.toString();
        var counties:XMLList = _myXml.state.(@label = {selected}).county;

I get a compiler error for the last line, and I have searched through some
E4X samples, didn't seem to find any help.  Any advice?

Thanks!

- Tangent

P.S.  Or should I use XmlViewCollection, Descriptor or things like that?



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcoders/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to