1 Reply Latest reply on Sep 7, 2008 1:23 AM by Peter Lorent

    HTTPService and parsing XML

    esklein1
      I have a simple HTTP service which is supposed to receive one value from my database. Here is the HTTP Service which sends clientID parameter to the db:

      <mx:HTTPService id="getClientLicenseXML" requestTimeout="30" url="FData/ClientGetLicense.cfm" showBusyCursor="true" resultFormat="e4x" result="getlicense(event)">
      <mx:request>
      <clientid>{Application.application.userInfo.ClientID}</clientid>
      </mx:request>
      </mx:HTTPService>

      The getlicense() function is used as a handler:

      [Bindable]
      private var licensedata:XML;
      private function getlicense(event:ResultEvent):void
      {
      licensedata = event.result as XML;
      }

      The final piece is the label which I am looking to display a node of the XML data. The code for that label is:

      <mx:Label id="available" text="{licensedata}"/>

      The label is displaying the raw XML which is as follows:

      <clientxml>
      <clientinfo license="25" />
      </clientxml>

      My question is, how can I display only the value of the data which in this case is 25.


      Thanks,

      Evan