如何从MiniDom元素中删除命名空间?

时间:2014-07-22 10:23:16

标签: python python-2.7 minidom

我有minidom对象需要保存到字符串,但问题是每个元素都被某个名称空间包装,是否可以删除它?这是我的例子:

<Device:GetDeviceInformationResponse>
    <Device:Manufacturer>Pelco</Device:Manufacturer>
    <Device:Model>D5</Device:Model>
    <Device:FirmwareVersion>1.9.2.19-201</Device:FirmwareVersion>
    <Device:SerialNumber>AC</Device:SerialNumber>
    <Device:HardwareId>7006</Device:HardwareId>
</Device:GetDeviceInformationResponse>

0 个答案:

没有答案