1 Reply Latest reply on Oct 31, 2009 1:57 PM by 123miguel123

    Problems parsing a soap-xml result

    123miguel123

      Hi there!

       

      I got the following result (a soap based XML)

      <soap:Envelope 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">

        <soap:Body>

          <StatusResponse xmlns="http://www.miweb.com">

            <StatusResult>

              <result>

                <Status>1</Status>

              </result>

            </StatusResult>

          </StatusResponse>

        </soap:Body>

      </soap:Envelope>

       

      When I try to parse it I can't do it, I use the following lines:

       

           var myXML:XML = new XML (event.result.toString());

       

           var otro:XMLList = myXML.descendant("Status");

             for each (var item:XML in otro) {

                       trace (item.toString());

             }

      Nothing is showed in the console window

       

       

      If I change some labels it works, like this:

      <a>

        <b>

          </StatusResponse>   

            <StatusResult>

              <result>

                <Status>1</Status>

              </result>

            </StatusResult>

          </StatusResponse>

        </b>

      </a>

       

      With this I get the value: 1 in the console window

       

      What's the problem in here?

       

      Thanks in advance