Creating and Saving XML files
Here, you will learn how to create, save and view your XML file.
Making your XML file
Open any text editor on your computer. You can open Notepad, Wordpad, or whatever is available on your machine. Once it is open, you can begin typing XML code. For simplicity purposes, XML 1.0 will be used in this tutorial. Write your first line of code as follows:
<?xml version="1.0"?>
This initial line indicates that you are using XML 1.0.
Start typing XML as you wish. An example of XML code that follows the initial line is as follows:
<identification>
<firstname> Nicole </firstname>
<lastname> Kidd </lastname>
<address> 5 Jason Street, Kidman Village, California 90210 </address>
</identification>
Saving your XML file
Once you are done typing your XML code, make sure to save it with an ".xml" ending. When you view the file on your desktop or Windows explorer, it should look like this:
Viewing your XML file
Double click on the icon and you should be able to view your XML code on your browser like this:
Congratulations, you have just made your first XML code.