mercredi 25 novembre 2015

XML node cannot traced

A web-service returns a XML over SOAP and I am trying to parse it. However I cannot reach nodes. I trace XML at all but nodes are untraceable.

<soap:Envelope xmlns:soap="" xmlns:xsi="" xmlns:xsd="">
        <SbDrsRprRspnse xmlns="">
                    <AdSoyad>Maksim Tsygalha</AdSoyad>
                            <UnitsAdi>Ünite 3</UnitsAdi>
        </SbDrsRprRspnse >

I can trace(returnXML) and see all things above. But when I try trace(returnXML.children().children().children()) it shows nothing. Also ==null, ==undefined, ==" ", and =="" returns false. What am I doing wrong?


here is what I did after the comment;

private function ProcessXML(ref:XML):void
    var returnXML:XML = new XML(ref);
    var soap:Namespace = new Namespace("");
    trace(returnXML.soap::Body.SbDrsRprRspnse.SbDrsRprRslt.SODSRprDt.Aktif); //it returns nothing!

edit #2 I am using Flash Builder and it keeps throwing error for second namespace childrenNs - TypeError: Error 1080 - Illegal value for namespace. I have searched a little bit about the error but couldn't find something worthwhile. So maybe using a one namespace-soap just for testing that there is nothing else problematic. So is it possible to use only one namespace with this XML?

Aucun commentaire:

Enregistrer un commentaire