0 Replies Latest reply on Jul 23, 2007 5:39 PM by khaledk

    Nested XML with Repeater

    khaledk
      Hi all,

      I need your help with this xml file. I want to show it as the following output

      Text________________ [title]
      Text Text Text Text Text [text child of description]
      • Text [list item child of list which is child of description]
      • Text [list item child of list which is child of description]

      XML file is like the following:
      <?xml version="1.0" encoding="utf-8"?>
      <services>
      <service>
      <title>Service A</title>
      <description>
      <text>text text text text</text>
      <list>
      <item>text text text text</item>
      <item>text text text text</item>
      </list>
      </description>
      <description>
      <text>text text text text</text>
      </description>
      </service>
      <service>
      <title>Service B</title>
      <description>
      <list>
      <item>text text text text</item>
      <item>text text text text</item>
      </list>
      </description>
      </service>
      <services>

      I have used e4x format for the httpService call, in current state, repeater could not recognize the neasted nodes except title node.
      and here s my code:

      <mx:Repeater id="dataRepeater" width="100%" dataProvider="{servicesXMLList}">
      <mx:VBox width="100%">
      <mx:HBox width="100%">
      <mx:Label text="{dataRepeater.currentItem.title}" />
      <mx:HRule width="100%" height="20" />
      </mx:HBox>
      <mx:Text text="{dataRepeater.currentItem.description.text}" />
      <mx:HBox>
      <mx:Spacer width="20" />
      <mx:Label text="•" />
      <mx:Text text="{dataRepeater.currentItem.description.list.item}" />
      </mx:HBox>
      </mx:VBox>
      </mx:Repeater>