3 Replies Latest reply on Aug 27, 2008 3:29 PM by manheok

    xmlns presence prevents e4x access to XML data

    manheok
      I have been pulling my hair out trying to simply access data within a tag from an XML object. When I remove the xmlns attribute it works, otherwise it doesn't. In the code below when I remove "xmlns=http://xyz" the List displays the data. What do I need to add to keep this xmlns in the XML and still populate the List box?
      Thanks, JH

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="vertical" horizontalAlign="center">
      <mx:Script>
      <![CDATA[
      public var ydata:XML =
      <theResponse xmlns=" http://xyz">
      <theReturn>
      <myId>1234</myId>
      <myId>2345</myId>
      <myOther>5678</myOther>
      </theReturn>
      </theResponse>;
      ]]>
      </mx:Script>
      <mx:VBox width="100%" height="100%" horizontalAlign="center">
      <mx:List width="50%" dataProvider="{ydata..myId}" height="20%"/>
      </mx:VBox>
      </mx:Application>