In order to share an XML file among different systems and programs, this XML file need to checked well, what are the two things to be done?

/////////////////////////////////employees.xml////////////////////////////////////////////
<?xml version="1.0" encoding="UTF-8"?>
<employees>
<employee>
<first_name>Linda </first_name>
<middle_name>P.</middle_name>
<last_name>Jone</last_name>
<home_phone>386-333-2321</home_phone>
</employee>
<employee>
<first_name>Tom </first_name>
<last_name>Smith</last_name>
</employee>
<employee>
<first_name>Hilda </first_name>
<last_name>Parham</last_name>
<home_phone>386-455-5675</home_phone>
</employee>
</employees>

1 answer

I am not very familiar with XML. However, the above code looks reasonable to me. (Names are matched and nested, proper cases have been used, etc.)

If you have doubts about the syntax, you can have a syntax check using W3C's XML validator:
http://validator.w3.org/check
You just have to paste the code and it will display the diagnostics.

To be shared among users/systems, I believe it will need a document type definition (DTD) to define all the fields. As you notice, some fields are omitted. So the definition will indicate what are the "default" fields.

If you don't have adequate notes or textbook for your course, you can read up on W3C's tutorials. They are full of examples and explanations. See for example:
http://www.w3schools.com/xml/

Hope this helps.