4 Replies Latest reply on Oct 16, 2006 11:04 AM by leotemp

    XML parsing error

    FABIO.BARREIRO Level 1
      Hii Guys

      What's wrong? The alert does not appear :(

      MXML ----------------------------------------------------------------------------------------- ------------------------------------------

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute" >
      <mx:Script>
      <![CDATA[
      import mx.collections.ArrayCollection;
      import mx.controls.Alert;

      function logar():void {
      eadLogin.send();
      }

      function mostra():void {
      Alert.show(eadLogin.lastResult.data.nome);
      }

      ]]>
      </mx:Script>
      <mx:HTTPService method="POST" id="eadLogin" showBusyCursor="true" useProxy="false"
      url=" http://ead/flex/ead_interface.asp" result="mostra()">
      <mx:request xmlns="">
      <db_sql>select id,categoria_id,matricula,nome from tab_usuarios where matricula='{login.text}%' and senha='{senha.text}'</db_sql>
      <db_operation>SELECT</db_operation>
      <db_operation_sql></db_operation_sql>
      </mx:request>
      </mx:HTTPService>

      <mx:Panel id="painel" x="136" y="115" width="250" height="200" layout="absolute" title="EAD Universo - Área administrativa" horizontalAlign="center" verticalAlign="middle" >
      <mx:TextInput x="64.5" y="39" width="101" maxChars="15"/>
      <mx:TextInput x="81.5" y="93" width="67" displayAsPassword="true" maxChars="10"/>
      <mx:Label x="97" y="13" text="Login" id="login"/>
      <mx:Label x="97" y="69" text="Senha" id="senha"/>
      <mx:Button x="93.5" y="128" label="OK" click="logar()"/>
      </mx:Panel>
      </mx:Application>

      THE XML returned by the ASP file ---------------------------------------------------------------

      <?xml version="1.0" encoding="UTF-8" ?>
      <data>
      <record>
      <matricula>c2</matricula>
      <nome>Teste Cyro Neto</nome>
      </record>
      </data>