def parse_move(tree): device_log = tree.DeviceLog move = Move() add_children(move, device_log.Header) for child in device_log.Device.Info.iterchildren(): tag = normalize_tag(child.tag) attr = "device_info_%s" % tag.lower() set_attr(move, attr, child.text) normalize_move(move) return move
def parse_move(tree): move = Move() add_children(move, tree.header) normalize_move(move) return move