diff --git a/houses.py b/houses.py new file mode 100644 index 0000000..c4dbdca --- /dev/null +++ b/houses.py @@ -0,0 +1,17 @@ +import xml.etree.ElementTree as ET +hfrom = ET.parse('houses_from.xml') +hTo = ET.parse('houses_to.xml') +houses_from = hfrom.getroot() +houses_to = hTo.getroot() + +#cuscus houseificado para senhor fake +for house_from in houses_from: + for house_to in houses_to: + if house_to.get('name') == house_from.get('name'): + house_to.set('clientid', house_from.get('id')) + house_to.set('rent', house_from.get('rent')) + house_to.set('beds', house_from.get('beds')) + house_to.set('guildHall', house_from.get('guildHall')) + house_to.set('shop', house_from.get('shop')) + +hTo.write('output.xml') \ No newline at end of file