python 2.7 - SUDS - How to get a top level tag attribute -


i have structure in results of command test = client.service.xxx

<soapenv:envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">   <soapenv:header />   <soapenv:body>     <n:statusresponse xmlns:n="http://www.abcdefg/tatatata.xsd"                       n:result="0">       <n:id />       <n:seqno />       <n:user />       <status>         <n:code>1</n:code>         <devstatus n:devid="1"                     n:val="0"                     n:st="1000" />         <devstatus n:devid="2"                     n:val="0"                     n:st="1000" />       </status>     </n:statusresponse>   </soapenv:body> </soapenv:envelope> 

if set on log logging

logging.basicconfig(level=logging.info) logging.getlogger('suds.transport').setlevel(logging.debug) 

i found:

<soapenv:envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:header></soapenv:header><soapenv:body><n:statusresponse xmlns:n="http://www.abcdefg/tatatata.xsd" n:result="0"><n:id>1</n:id><n:seqno>123456789</n:seqno><n:user></n:user><status><n:code>1</n:code><devstatus n:dev id="1" n:val="0" n:st="1000"></devstatus><devstatus n:devid="2" n:val="0" n:st="1000"></devstatus></status><cash n:type="1"></cash><requireverifyinfos><requireverifydenominationinfos><requireverifydenomination n:devid="1" n:val="0"></requireverifydenomination><requireverifydenomination n:devid="2" n :val="0"></requireverifydenomination></requireverifydenominationinfos><requireverifycollectioncontainerinfos><requireverifycollectioncontainer n:devid="1" n:val="0"></requireverifycollectioncontainer><requireverifycollectioncontainer n:devid="2" n:val="0"></requireverifycollectioncontainer></require verifycollectioncontainerinfos><requireverifymixstackerinfos><requireverifymixstacker n:devid="1" n:val="0"></requireverifymixstacker><requireverifymixstacker n:devid="2" n:val="0"></requireverifymixstacker></requireverifymixstackerinfos></requireverifyinfos></n:statusresponse></soapenv:body></soape nv:envelope> 

and see:

<n:statusresponse xmlns:n="http://www.abcdefg/tatatata.xsd" n:result="0"> 

how vaule of result?

    <n:statusresponse xmlns:n="http://www.abcdefg/tatatata.xsd"                       n:result="0"> 

i have problem on statusresponse tag.

i take elements of devstatus tag can not take elements of tag statusresponse . in result of print test not see tag statusresponse

if print results see:

(reply){    id = none    seqno = "123456789"    user = none    status =       (statustype){          code = 1          devstatus[] =             (devstatustype){                _val = 0                _devid = 1                _st = 1000             },             (devstatustype){                _val = 0                _devid = 2                _st = 1000             },       }  } 


Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -