def __init__(self, xml_node) : #Transforms xml goal into a goal object (self.pos, self.pos_unit, self.size, self.size_unit) = xml_funcs.get_box_with_units(xml_node) image_file_nodes = xml_node.getElementsByTagName("image") if (len(image_file_nodes) > 0) : self.image_file = xml_funcs.getText(image_file_nodes[0]) else : self.image_file = None if (self.image_file == None) : # TODO: to add from XML self.text = "?" else : self.text = None
def __init__(self, xml_node): #Transforms xml goal into a goal object (self.pos, self.pos_unit, self.size, self.size_unit) = xml_funcs.get_box_with_units(xml_node) image_file_nodes = xml_node.getElementsByTagName("image") if (len(image_file_nodes) > 0): self.image_file = xml_funcs.getText(image_file_nodes[0]) else: self.image_file = None if (self.image_file == None): # TODO: to add from XML self.text = "?" else: self.text = None
def __init__(self, xml_node): (self.pos, self.pos_unit, self.size, self.size_unit) = xml_funcs.get_box_with_units(xml_node)