Hi all,
Yesterday i had posted a query abt importing xml data using the
HTTPService. Here is the sample code. I am unable to view the dat in
the external file into the text area. Is there a problem with the code.

test.xml
-----------
<order amount=5>
<item id = "3456">
    <description>Big Screen Television</description>
    <price>1299.99</price>
    <quantity>1</quantity>
</item>
<item id = "56789">
     <description>DVD Player</description>
     <price>399.99</price>
     <quantity>1</quantity>
</item>
</order>

myApp.mxml
-------------
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
layout="absolute" creationComplete="srv.send();">
<mx:Script>
        <![CDATA[
                import mx.collections.ArrayCollection;
        ]]>
</mx:Script>
        <mx:HTTPService id="srv"  resultFormat ="e4x" url="images.xml"/>
        <mx:TextInput id="gettxt"
dtext="{srv.lastResult.order.item.(@amount)}" width="348" height="207"/>
</mx:Application>

I have even tried changing the resultFormat by changing it from null
to e4x to xml. nuthing worked.I want to display the value of the
'amount' attribute in the textInput box.

My application suppose needs to convert the data from the external xml
file into a local XML object how can i do that? I know there is
XMLNode and XML type data objects available. however i dont understand
how to copy the data of the external file into an XML object.

Kindly help,
Rama.
Thanks in advance.


 






------------------------ Yahoo! Groups Sponsor --------------------~--> 
See what's inside the new Yahoo! Groups email.
http://us.click.yahoo.com/2pRQfA/bOaOAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~-> 

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

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