I want to get a certain value.

In the code below "  ProjName = [EMAIL PROTECTED];   "  for first
attribute or second.

This is my code:

 

The Flex:

----------------------------------------------------------------------------
----------------------------------------------------------------------------
-------------------

<mx:HTTPService id="ProjStyleData" url="ProjectsStyle.xml "
resultFormat="e4x" result="ProjectsStylesHandler(event)"/>

<mx:Script>

                                <![CDATA[

                                                [Bindable]

                                                private var ProjName:String;

[Bindable]

                                                private var
ProjectNumber:int;

                                                public function
ProjectsStylesHandler(event:ResultEvent):void

                                                {

                                                                StyleList =
event.result..theStyle;

 
Alert.show([EMAIL PROTECTED] + " - " + [EMAIL PROTECTED]); 

                                                                ProjName =
[EMAIL PROTECTED];

                                                }

public function ProjectClick(ProjID:int):void

                                                {

 
ProjectNumber = ProjID;

 
ProjStyleData.send();

                                                }

]]>

                </mx:Script>

----------------------------------------------------------------------------
----------------------------------------------------------------------------
-------------------

The XML:

<ProjStyle>

  <items>

    <theStyle ProjectID="1" ProjectName="Almaza" BG="BG.swf" Body="BODY.swf"
/>

    <theStyle ProjectID="2" ProjectName="Makadi" BG="BG.swf" Body="BODY.swf"
/>

  </items>

</ProjStyle>

----------------------------------------------------------------------------
----------------------------------------------------------------------------
-------------------

 

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Sherif Abdou
Sent: Tuesday, February 12, 2008 5:16 PM
To: [email protected]
Subject: Re: [flexcoders] Problem With XML

 

how are you retreiving the attribute?

----- Original Message ----
From: "NileAge, Mail" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]; Flex Components <[EMAIL PROTECTED]>;
[EMAIL PROTECTED]; [email protected];
[EMAIL PROTECTED]
Sent: Tuesday, February 12, 2008 8:28:26 AM
Subject: [flexcoders] Problem With XML

I have a problem when I try to start application to get some data from
database on creationComplete event and  then set this data in xml file then
when I click on LinkBar Item to change the data and get certain attribute,
the problem that I get all attributes when I want only one attribute.

 

example: 

get the data of ProjectID="1"

 


<ProjStyle>

  <items>

    <theStyle ProjectID="1" ProjectName="Almaza" BG="BG.swf" Body="BODY.swf"
/>

    <theStyle ProjectID="2" ProjectName="Makadi" BG="BG.swf" Body="BODY.swf"
/>

  </items>

</ProjStyle>

 

 

  _____  

Looking for last minute shopping deals? Find
<http://us.rd.yahoo.com/evt=51734/*http:/tools.search.yahoo.com/newsearch/ca
tegory.php?category=shopping>  them fast with Yahoo! Search.

 

Reply via email to