I am new too, but I think it would work like this...

 

Your HTTPService needs an ID, say ID=”MyHTTPService1”

 

Then after you have sent the request via MyHTTPService1.send() the response should be accessible as follows:

 

            myCategoryVar = MyHTTPService1.lastResult.data.record.category;

 

If you have multiple records in that XML, you could get it via Index

 

            myCategoryVar = MyHTTPService1.lastResult.data.record[0].category;

 

-Iko

 


From: [email protected] [mailto:[email protected]] On Behalf Of Fabio Barreiro
Sent: Monday, October 16, 2006 7:37 AM
To: [email protected]
Subject: [flexcoders] xml question

 

Hi guys

 

I’m new to Flex...

I’ve created a HTTPService which reads an XML file and once done calls a function

I want this function to perform different actions based on the data received. How to do it?

 

The xml looks like

<data>
<record>
  <id>131</id>
  <category>4</category>
  <mat>c2</mat>
  <name>Teste Cyro Neto</name>
</record>
</data>

 

and for example, I want to execute some code if the category is 4, and other code if it’s not 4.

 

Any other way not using HTTPService?

 

Thanks!!

__._,_.___

--
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