Ejemplo n.º 1
0
 def write_house_xml(p_pyhouse_obj):
     """Replace the data in the 'Houses' section with the current data.
     """
     l_house_xml = XmlConfigTools.write_base_UUID_object_xml('HouseDivision', p_pyhouse_obj.House)
     l_house_xml.append(locationXML.write_location_xml(p_pyhouse_obj.House.Location))
     l_house_xml.append(roomsXML.write_rooms_xml(p_pyhouse_obj.House.Rooms))
     return l_house_xml
Ejemplo n.º 2
0
 def read_house_xml(p_pyhouse_obj):
     """Read house information, location and rooms.
     """
     l_xml = p_pyhouse_obj.Xml.XmlRoot.find('HouseDivision')
     p_pyhouse_obj.House = Xml._read_base(l_xml)
     p_pyhouse_obj.House.Location = locationXML.read_location_xml(p_pyhouse_obj)
     p_pyhouse_obj.House.Rooms = roomsXML.read_rooms_xml(l_xml)
     #  print(PrettyFormatAny.form(p_pyhouse_obj.House, 'House-75'))
     return p_pyhouse_obj.House
Ejemplo n.º 3
0
 def write_house_xml(p_pyhouse_obj):
     """Replace the data in the 'Houses' section with the current data.
     """
     #  print(PrettyFormatAny.form(p_pyhouse_obj, 'PyHouse'))
     #  l_house_obj = p_pyhouse_obj.House
     #  print(PrettyFormatAny.form(l_house_obj, 'PyHouse'))
     l_house_xml = XmlConfigTools.write_base_object_xml('HouseDivision', p_pyhouse_obj.House)
     l_house_xml.append(locationXML.write_location_xml(p_pyhouse_obj.House.Location))
     l_house_xml.append(roomsXML.write_rooms_xml(p_pyhouse_obj.House.Rooms))
     return l_house_xml