Hi,

This might help you
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
layout="absolute">
        <mx:Button label="parse data" click="ser1.send()"/>
        <mx:HTTPService id="ser1" url="../src/assets/details.xml"
result="resHandler(event)" fault="fltHander(event)" resultFormat="e4x"/
>
        <mx:Script>
                <![CDATA[
                        import mx.utils.StringUtil;
                        import mx.collections.ArrayCollection;
                        import mx.controls.Alert;
                        import mx.rpc.events.FaultEvent;
                        import mx.rpc.events.ResultEvent;
                        public function resHandler(event:ResultEvent):void
                        {
                                var resXml:XML = new XML(event.result);
                                var xmllist:XMLList = resXml.children();
                                Alert.show(""+xmllist.length());
                                for(var cnt:int = 0;cnt<xmllist.length();cnt++)
                                {
                                        
if(StringUtil.trim(xmllist[cnt]..@metricId).length>0)
                                        {
                                                
Alert.show(""+xmllist[cnt]..@metricId);
                                        }
                                }
                        }
                        public function fltHander(event:FaultEvent):void
                        {
                                Alert.show(""+event.fault.message);
                        }

                ]]>
        </mx:Script>
</mx:Application>
Thanks & Regards
Santosh M
http://techflex.blog.com

On Mar 23, 4:50 pm, Abdul <[email protected]> wrote:
> Hi ,
>
> This link may help for u 
> :)http://blog.flexexamples.com/2008/08/28/parsing-xml-nodes-and-objects...
>
> On 23 March 2011 13:11, S k R p <[email protected]> wrote:
>
>
>
>
>
> > Hi All ,
>
> >   I am new to Flex , i have a requirement like , i have a xml  ie :
>
> >  <tm activeTabIndex="0" globaldate="10/20/2010">
> >    <tab id="c0" name="c0" label="Flash Panel">
> >    <panel id="p0" name="p0" x="0" y="0" width="240" height="240"
> > headerDesc="">
> >      <content type="chart">
> >        <charts metricId="13753" metricName="chart0">
> >          <chartxml>
> >            <color>FF0000</color>
> >          </chartxml>
> >        </charts>
> >      </content>
> >    </panel>
> >  </tab>
> > </tm>
>
> > --From this how can i get "metricId" value ie 13753..in flex..
>
> > plzzz help.
>
> > Thanks in Advance.....
>
> > --
> > View this message in context:
> >http://old.nabble.com/get-Property-value-from-xml-in-Flex3-tp31217416...
> > Sent from the Flex India mailing list archive at Nabble.com.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Flex India Community" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected].
> > For more options, visit this group at
> >http://groups.google.com/group/flex_india?hl=en.
>
> --
> *With Regards,
> Abdul <https://abdulthink.wordpress.com/>**
> *

-- 
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en.

Reply via email to