Hi Paul,

The XML file is as follows:
====================================================

<?xml version="1.0" encoding="utf8" ?> 
 <root> 
 <food> 
  <category>Fruit</category>  
          <categoryitem> 
                  <item1>Cakes</item1> 
                  <item2>Chocolates</item2> 
          </categoryitem>   
  <category>Vegetable</category> 
         <categoryitem> 
                  <item1>Onion</item1> 
                  <item2>Tomato</item2> 
          </categoryitem>   
  </food> 
  </root> 

=====================================================
The MXML file is as follows
=====================================================
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; 
layout="absolute" creationComplete="userRequest.send()">
<mx:HTTPService id="userRequest" url="../src/data.xml" />

<mx:List id="aa" 
dataProvider="{userRequest.lastResult.root.food.categoryitem.item1}" 
x="10" y="25"/> 

</mx:Application>




--- In flexcoders@yahoogroups.com, "Paul Andrews" <[EMAIL PROTECTED]> wrote:
>
> I can't help but think something else is going on. Can you post the 
xml and 
> the code here?
> 
> Paul
> ----- Original Message ----- 
> From: "flex2_4me" <[EMAIL PROTECTED]>
> To: <flexcoders@yahoogroups.com>
> Sent: Friday, January 18, 2008 5:35 AM
> Subject: [flexcoders] Re: Dataprovider for list
> 
> 
> > Hi Paul-
> >
> > This doesn`t work...
> >
> > Any help is really appreciated..
> >
> > --- In flexcoders@yahoogroups.com, "Paul Andrews" <paul@> wrote:
> >>
> >> Looks as though it should work.
> >>
> >> Try:
> >>
> >> <mx:List id="aa"dataProvider="{getService.lastResult..item1}"
> > x="10"
> >> y="25"/>
> >>
> >> Paul
> >> ----- Original Message ----- 
> >> From: "flex2_4me" <flex2_4me@>
> >> To: <flexcoders@yahoogroups.com>
> >> Sent: Wednesday, January 16, 2008 12:10 PM
> >> Subject: [flexcoders] Dataprovider for list
> >>
> >>
> >> > Hi-
> >> >
> >> > I have an XML file as follows
> >> >
> >> > <?xml version="1.0" encoding="utf8" ?>
> >> > <root>
> >> > <food>
> >> >  <category>Fruit</category>
> >> >   <categoryitem>
> >> >   <item1>Cakes</item1>
> >> >   <item2>Chocolates</item2>
> >> >   </categoryitem>
> >> >  <category>Vegetable</category>
> >> > <categoryitem>
> >> >   <item1>Onion</item1>
> >> >   <item2>Potato</item2>
> >> >                  <item3>Tomato</item3>
> >> >   </categoryitem>
> >> >  </food>
> >> >  </root>
> >> >
> >> > I am using HTTPservice with id "getService"
> >> >
> >> > <mx:List
> >> > 
id="aa"dataProvider="{getService.lastResult.root.food.category}"
> >> > x="10" y="25"/>
> >> >
> >> > Using this i am getting 'Fruit' and 'vegetable' in the list
> >> >
> >> > Now my Question is i want all <item1> to be displayed in list
> > control
> >> > ie.'Cakes'& 'onion'
> >> > For this i tried
> >> > <mx:List
> >> >
> > 
id="aa"dataProvider="{getService.lastResult.root.food.categoryitem.ite
> >> > m1}" x="10" y="25"/>
> >> >
> >> > But it is throwing error:
> >> >
> >> > Error: Unknown Property: 'item1'.
> >> > at
> >> >
> > 
mx.collections::ListCollectionView/http://www.adobe.com/2006/actionscr
> >> > ipt/flash/proxy::getProperty()[E:\dev\flex_3_beta3
> >> >
> > 
\sdk\frameworks\projects\framework\src\mx\collections\ListCollectionVi
> >> > ew.as:690]
> >> > at mx.binding::PropertyWatcher/updateProperty()
> >> > [E:\dev\flex_3_beta3
> >> >
> > 
\sdk\frameworks\projects\framework\src\mx\binding\PropertyWatcher.as:2
> >> > 91]
> >> > at Function/http://adobe.com/AS3/2006/builtin::apply()
> >> > at mx.binding::Watcher/wrapUpdate()[E:\dev\flex_3_beta3
> >> > 
\sdk\frameworks\projects\framework\src\mx\binding\Watcher.as:180]
> >> > at mx.binding::PropertyWatcher/updateParent()
> >> > [E:\dev\flex_3_beta3
> >> >
> > 
\sdk\frameworks\projects\framework\src\mx\binding\PropertyWatcher.as:1
> >> > 97]
> >> > at mx.binding::Watcher/updateChildren()[E:\dev\flex_3_beta3
> >> > 
\sdk\frameworks\projects\framework\src\mx\binding\Watcher.as:126]
> >> > at mx.binding::PropertyWatcher/updateProperty()
> >> > [E:\dev\flex_3_beta3
> >> >
> > 
\sdk\frameworks\projects\framework\src\mx\binding\PropertyWatcher.as:3
> >> > 00]
> >> > at Function/http://adobe.com/AS3/2006/builtin::apply()
> >> > at mx.binding::Watcher/wrapUpdate()[E:\dev\flex_3_beta3
> >> > 
\sdk\frameworks\projects\framework\src\mx\binding\Watcher.as:180]
> >> > at mx.binding::PropertyWatcher/updateParent()
> >> > [E:\dev\flex_3_beta3
> >> >
> > 
\sdk\frameworks\projects\framework\src\mx\binding\PropertyWatcher.as:1
> >> > 97]
> >> > at mx.binding::Watcher/updateChildren()[E:\dev\flex_3_beta3
> >> > 
\sdk\frameworks\projects\framework\src\mx\binding\Watcher.as:126]
> >> > at mx.binding::PropertyWatcher/updateProperty()
> >> > [E:\dev\flex_3_beta3
> >> >
> > 
\sdk\frameworks\projects\framework\src\mx\binding\PropertyWatcher.as:3
> >> > 00]
> >> > at Function/http://adobe.com/AS3/2006/builtin::apply()
> >> > at mx.binding::Watcher/wrapUpdate()[E:\dev\flex_3_beta3
> >> > 
\sdk\frameworks\projects\framework\src\mx\binding\Watcher.as:180]
> >> > at mx.binding::PropertyWatcher/updateParent()
> >> > [E:\dev\flex_3_beta3
> >> >
> > 
\sdk\frameworks\projects\framework\src\mx\binding\PropertyWatcher.as:1
> >> > 97]
> >> > at mx.binding::Watcher/updateChildren()[E:\dev\flex_3_beta3
> >> > 
\sdk\frameworks\projects\framework\src\mx\binding\Watcher.as:126]
> >> > at mx.binding::PropertyWatcher/updateProperty()
> >> > [E:\dev\flex_3_beta3
> >> >
> > 
\sdk\frameworks\projects\framework\src\mx\binding\PropertyWatcher.as:3
> >> > 00]
> >> > at Function/http://adobe.com/AS3/2006/builtin::apply()
> >> > at mx.binding::Watcher/wrapUpdate()[E:\dev\flex_3_beta3
> >> > 
\sdk\frameworks\projects\framework\src\mx\binding\Watcher.as:180]
> >> > at mx.binding::PropertyWatcher/updateParent()
> >> > [E:\dev\flex_3_beta3
> >> >
> > 
\sdk\frameworks\projects\framework\src\mx\binding\PropertyWatcher.as:1
> >> > 97]
> >> > at mx.binding::Watcher/updateChildren()[E:\dev\flex_3_beta3
> >> > 
\sdk\frameworks\projects\framework\src\mx\binding\Watcher.as:126]
> >> > at mx.binding::PropertyWatcher/updateProperty()
> >> > [E:\dev\flex_3_beta3
> >> >
> > 
\sdk\frameworks\projects\framework\src\mx\binding\PropertyWatcher.as:3
> >> > 00]
> >> > at Function/http://adobe.com/AS3/2006/builtin::apply()
> >> > at mx.binding::Watcher/wrapUpdate()[E:\dev\flex_3_beta3
> >> > 
\sdk\frameworks\projects\framework\src\mx\binding\Watcher.as:180]
> >> > at mx.binding::PropertyWatcher/eventHandler()
> >> > [E:\dev\flex_3_beta3
> >> >
> > 
\sdk\frameworks\projects\framework\src\mx\binding\PropertyWatcher.as:3
> >> > 23]
> >> > at flash.events::EventDispatcher/dispatchEventFunction()
> >> > at flash.events::EventDispatcher/dispatchEvent()
> >> > at
> >> >
> > 
mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::re
> >> > sultHandler()[E:\dev\flex_3_beta3
> >> > \sdk\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:195]
> >> > at mx.rpc::Responder/result()[E:\dev\flex_3_beta3
> >> > \sdk\frameworks\projects\rpc\src\mx\rpc\Responder.as:48]
> >> > at mx.rpc::AsyncRequest/acknowledge()[E:\dev\flex_3_beta3
> >> > \sdk\frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:81]
> >> > at DirectHTTPMessageResponder/completeHandler()
> >> > [E:\dev\flex_3_beta3
> >> >
> > 
\sdk\frameworks\projects\rpc\src\mx\messaging\channels\DirectHTTPChann
> >> > el.as:387]
> >> > at flash.events::EventDispatcher/dispatchEventFunction()
> >> > at flash.events::EventDispatcher/dispatchEvent()
> >> > at flash.net::URLLoader/onComplete()
> >> >
> >> > Any help in this regard is highly appreciated.
> >> >
> >> >
> >> >
> >> >
> >> >
> >> > --
> >> > 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
> >> >
> >> >
> >> >
> >> >
> >>
> >
> >
> >
> >
> > --
> > 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
> >
> >
> >
>


Reply via email to