getting specific value in <type instance>

旧街凉风 提交于 2020-01-16 03:05:20

问题


I think this is an output from SOAP, is it possible to get specific values from here, I already tried to append it into the list, but it is not working. The output I got is something like this:

(reply){
   QueryResult = 
      (QueryResult){
         NewDataSet = 
            (NewDataSet){
               schema = 
                  (schema){
                     _id = "NewDataSet"
                     element = 
                        (element){
                           _IsDataSet = "true"
                           _UseCurrentLocale = "true"
                           _name = "NewDataSet"
                           complexType = 
                              (complexType){
                                 choice = 
                                    (choice){
                                       _maxOccurs = "unbounded"
                                       _minOccurs = "0"
                                       element = 
                                          (element){
                                             _name = "Table"
                                             complexType = 
                                                (complexType){
                                                   sequence = 
                                                      (sequence){
                                                         element[] = 
                                                            (element){
                                                               _type = "xs:string"
                                                               _name = "Holder"
                                                               _minOccurs = "0"
                                                            },
                                                            (element){
                                                               _type = "xs:string"
                                                               _name = "Job"
                                                               _minOccurs = "0"
                                                            },
                                                            (element){
                                                               _type = "xs:int"
                                                               _name = "SliderCount"
                                                               _minOccurs = "0"
                                                            },
                                                            (element){
                                                               _type = "xs:int"
                                                               _name = "RowCount"
                                                               _minOccurs = "0"
                                                            },
                                                      }
                                                }
                                          }
                                    }
                              }
                        }
                  }
               Table = 
                  (Table){
                     ResultA = "Dora"
                     ResultB = "The Explorer"
                     ResultC=  "123-321"

                  }
            }
      }
   HasMoreRows = False
 }

Im not sure if this is an XML, dict or what, and I tried this script "print type(results)" and the output is: "type 'instance'"

I just need to get specific value in my output and the others will be ignored just like the split method or finding values in the list,

 ResultA = "Dora"
 ResultB = "The Explore
  ResultC=  "123-321"

Any suggestions/comments thanks in advance

来源:https://stackoverflow.com/questions/34311640/getting-specific-value-in-type-instance

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!