Hii

 

Thanks  Tobias, but the answer is not that

I got the solution from another group

 

I have to use a XMLList object in other to be able to access the XML structure

 

var xmlList:XMLList = xmlMenu.categoria;

 

…then…

 

 

for each(var categ:Object in xmlList){

Alert.show([EMAIL PROTECTED]());

}

 


De: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Em nome de tobiaspatton
Enviada em: quinta-feira, 19 de outubro de 2006 14:08
Para: flexcoders@yahoogroups.com
Assunto: [flexcoders] Re: show xml node

 

To get the length of an XMLList object call the "length()" function,
no the "length" property.

In your case: Alert.show( xmlMenu.itens.categoria.length() )

Tobias.

--- In [EMAIL PROTECTED]ups.com, "Fabio Barreiro" <fabio.flex@...>
wrote:
>
> Guys, I have a doubt..
>
> Why does the code below is not working?
>
> And how to show a node attirbute?
>
>
>
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute"
> initialize="mostra()">
>
> <mx:Script>
>
> <![CDATA[
>
> import mx.collections.ArrayCollection;
>
> import mx.containers.Canvas;
>
> import mx.controls.Alert;
>
>
>
> function mostra() {
>
>
> Alert.show(xmlMenu.itens.categoria.length.toString());
>
> }
>
> ]]>
>
>
>
> </mx:Script>
>
>
>
> <mx:XML id="xmlMenu" format="e4x">
>
> <itens>
>
> <categoria nome="Cadastros">
>
> <item nome="Usuarios" />
>
> <item nome="Grupos" />
>
> </categoria>
>
> <categoria nome="Ferramentas">
>
> <item nome="Alunos" />
>
> <item nome="Forum" />
>
> <item nome="Chat" />
>
> </categoria>
>
> </itens>
>
> </mx:XML>
>
> </mx:Application>
>

__._,_.___

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





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to