2 Replies Latest reply on Nov 9, 2008 5:56 AM by Sudhir Jena

    Problem handling XML Results

    Sudhir Jena
      Hi All!

      I have a.net web service that returns the following XML output:

      I would like actionscript code to bind the XML data to a menu bar (myMenuBar)'s dataProvider Property.
      Also how can I set my webservice.initMenu result format to e4x in actionscript
        • 1. Re: Problem handling XML Results
          m_hartnett Level 3
          <?xml version="1.0" encoding="utf-8"?>
          <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml"


          import mx.collections.XMLListCollection;
          private var xmlData : XML =
          <menuitem label="Main">
          <menuitem label="Go Back" />
          <menuitem label="Go Forward" />
          [Bindable]private var xmlL : XMLListCollection;
          public function init():void{
          xmlL = new XMLListCollection(xmlData.children());

          <mx:MenuBar dataProvider="{xmlL}" labelField="@label"></mx:MenuBar>

          • 2. Re: Problem handling XML Results
            Sudhir Jena Level 1
            Thanks wingobaxter for your help, But I think you didn't get my question right. I don't want to declare the XML in Flex. It should come from a .net webservice and its coming. But am not able to populate MenuBar with the same xml