0 Replies Latest reply on Mar 28, 2008 9:33 AM by Michael Regert

    Problem with parsing e4x data

    Michael Regert Level 1
      I'm trying to write a very simple test app which calls a .NET Webservice. I have everything working, but can't for the life of me get the e4x parsing working. I think it is because Microsoft returns a <diffgr:diffgram> tag which I belive is throwing this off. Suggestions?!? I've tried various solutions posted on the internet (search via Google), but nothing seems to work.

      The way I'm parsing this is in a for loop as:

      for ( var i:int = 0; i < WS.FunctionCall.lastResult.FunctionCallResult.diffgram.NewDataSet.Table1.length(); i++) {
      ...
      }

      The returned XML is below (change to remove proprietary data).

      <FunctionCallResponse xmlns="xxxx" xmlns:soap=" http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd=" http://www.w3.org/2001/XMLSchema">
      <FunctionCallResult>
      <diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
      <NewDataSet>
      <Table1 diffgr:id="Table11" msdata:rowOrder="0">
      <Property1>Hello World</Property1>
      <Property2>8</Property2>
      </Table1>
      </NewDataSet>
      </diffgr:diffgram>
      </GetReportResultResult>
      </GetReportResultResponse>