Question: On Python, Create a GUI with three text-fields, appropriate labels, and a button. When running the GUI, the user will enter data into the text-fields

On Python,

Create a GUI with three text-fields, appropriate labels, and a button. When running the GUI, the user will enter data into the text-fields that, after the button is pushed, will become the data in an XML file.

Note that the program will create an element with sub-elements and add the larger element within the root element of the XML file.

The XML file will have a root element called 'nations'. Inside the 'nations' element will be a sequence of 'country' elements. The country elements will contain name, population, and continent elements. An example of the XML file might look like this.

France 66.99 Europe

(Note that population values are measured in millions).

If you aren't familiar with XML, copy and paste the text in bold into a text file and save with a .xml file extension. That's your XML file.

So the purpose of your GUI is to allow you to enter data that will become the data in the name, population, and continent elements. Clicking the GUI button creates a country element with name, population, and continent elements filled with the data from the GUI. That new country element is placed at the end of the existing country element(s) within the root element.

Previous

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!