To learn how to save data into an XML file using the
QDomDocument class, let's do the following:
First of all, add the second button to the UI, called Save XML:
After that, write the following code within the button's
Open up the XML file you just saved in Step 4 with any text editor and you should see something like this:
<!DOCTYPE contact> <contact category="Family"> <name>John Doe</name> <age>32</age> <...