1 Reply Latest reply on Dec 30, 2007 9:02 AM by pchris1977

    Unable to pass XML data to a DataGrid

    pchris1977

      I am using a web service to get data from SQL Server with result:handleFirme(event).

      public function handleFirme(event:ResultEvent):void
      {
      var xmlResult:XML = XML(event.result);
      var xlResult:XMLList = xmlResult.row1;
      var dg2data:XMLListCollection = new XMLListCollection(xlResult);
      var data:String=dg2data.toXMLString();
      //breakpoint for reading variables XML and data
      }
      I run this application in Debug mode and I see (in expression)
      XML=
      <method:methodResponse xmlns:xsd=" http://www.w3.org/2001/XMLSchema" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV=" http://schemas.xmlsoap.org/soap/envelope/" xmlns:sql=" http://schemas.microsoft.com/sqlserver/2004/SOAP" xmlns:sqlsoaptypes=" http://schemas.microsoft.com/sqlserver/2004/SOAP/types" xmlns:sqlrowcount=" http://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlRowCount" xmlns:sqlmessage=" http://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlMessage" xmlns:sqlresultstream=" http://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlResultStream" xmlns:sqltransaction=" http://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlTransaction" xmlns:sqltypes=" http://schemas.microsoft.com/sqlserver/2004/sqltypes" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:method=" http://cristyp">
      <method:methodResult msdata:UseDataSetSchemaOnly="true" msdata:UDTColumnValueWrapped="true">
      <diffgr:diffgram xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
      <SqlRowSet1 xmlns="urn:schemas-microsoft-com:sql:SqlRowSet1">
      <row1>
      <IDPartener>
      1
      </IDPartener>
      <Denumire>
      S.C. Vasile S.R.L.
      </Denumire>
      <Cod_Fiscal>
      RO234234
      </Cod_Fiscal>
      <IDLocalitate>
      Bucuresti
      </IDLocalitate>
      </row1>
      <row1>
      <IDPartener>
      2
      </IDPartener>
      <Denumire>
      S.C. Ion S.A.
      </Denumire>
      <Cod_Fiscal>
      RO456456456
      </Cod_Fiscal>
      <IDLocalitate>
      Cluj Napoca
      </IDLocalitate>
      </row1>
      </SqlRowSet1>
      </diffgr:diffgram>
      </method:listafirmeResult>
      </method:listafirmeResponse>


      date=""; //empty

      I don't know how to make this code works.

      Thanks in advance,
      Cristy