def __init__(self, xml_string):
try:
self.xml = minidom.parseString(xml_string)
except:
print xml_string
self.bucket = get_tag_text(self.xml, 'Bucket', convert_to_bool = False)
self.type = get_tag_text(self.xml, 'Type', convert_to_bool = False)
self.key = get_tag_text(self.xml, 'Key', convert_to_bool = False)
self.last_modified = get_tag_text(self.xml, 'LastModified', convert_to_bool = False)
self.etag = get_tag_text(self.xml, 'ETag', convert_to_bool = False)
self.content_type = get_tag_text(self.xml, 'Content-Type')
self.size = get_tag_text(self.xml, 'Size', convert_to_bool = False)
self.parts = []
parts = self.xml.getElementsByTagName('Part')
for p in parts:
self.parts.append(Part(p))
评论列表
文章目录