12.python 解析接口返回的xml 模块推荐——python学习笔记

返回的xml格式如下:

{"sigSource":0}728FF3AA-B755-47AF-A235-8168C0EF1649pass_1100

引入from xml.etree import ElementTree

查找Code示意:

data = ElementTree.XML(result.decode('utf-8'))
    print(data.find('Code').text)

输出:
在这里插入图片描述

你可能感兴趣的:(python)