|
OK, a Menu really can’t handle XML
formatted the way you have it. Menus need their XML to have attributes, not
child tags. However, if you create an object structure instead of relying on
raw XML things will work with this structure. <?xml version="1.0"
encoding="utf-8"?> <mx:Application
xmlns:mx="http://www.macromedia.com/2003/mxml"> <mx:Panel
xmlns:mx="http://www.macromedia.com/2003/mxml" width="100%"
height="500"> <mx:Script> <![CDATA[ var dataObject : Object; ]]> </mx:Script> <mx:MenuBar id="menu1"
width="100%" dataProvider="{theXML}"
labelFunction="labelFunc"
mouseDown="event.menuItem.attributes.label"/> </mx:Panel> <mx:Script> function labelFunc(item) : String { return
item.getProperty("Name"); } </mx:Script> <mx:Model id="theXML"> <Category> <Id>1</Id> <Name>Artistry Skin Care and
Cosmetics</Name> <Description> A full range of basic
to speciality skin care treatments made with the highest quality formulations
to meet the needs of women today as well as a spectrum of colour for both
background and feature cosmetics to match any mood or occasion.TRY™ is
among the world's top five, largest selling, prestige brands of facial skincare
and cosmetics. Based on a 2000 Euromonitor International study of estimated
global retail sales. </Description> <Image>homephoto.jpg</Image> <Subcategory> <Id>1</Id> <Name>Dry-Skin</Name> <Description>Testing
jaxb</Description> <item>123.xml</item> </Subcategory> <Subcategory> <Id> 2 </Id> <Name> <Description> Testing
jaxb</Description> <Subcategory> <Id> 121 </Id> <Name>Aqua</Name> <Description> Testing
jaxb2</Description> <item> 124.xml </item> </Subcategory> <Subcategory> <Id> 13 </Id> <Name>Non-Aqua</Name> <Description> Testing
jaxb3</Description> <item> 124.xml </item> </Subcategory> </Subcategory> <Subcategory> <Id>3</Id> <Name>Oily-Skin</Name> <Description>Testing
jaxb</Description> <item>125.xml</item> </Subcategory> <Subcategory> <Id>4</Id> <Name>Sensitive-Skin</Name> <Description>Testing
jaxb</Description> <item>126.xml</item> </Subcategory> </Category> </mx:Model> </mx:Application> If you’re getting the data from
HTTPService just set resultFormat=”object”. HTH, Matt Yahoo! Groups Links
|

