XML - Managing Data Exchange/Introduction/Answers

Exercise 1

edit

Use NetBeans to create a markup file describing a restaurant. The markup should identify the name and address of the restaurant and the type of food or foods in which it specializes.

Answer

edit

Submitted by Princess Anne Rayborn

<restaurant>My favorite restaurant is <restaurantname>Olive Garden</restaurantname>. It is a
chain that has branches all over. I have been to the restaurants in 
<location>Houston</location>, <location>Marietta</location>, and
<location>Alpharetta</location>. They serve <cuisine>Italian</cuisine> food -- my favorite is 
the <dish>Stuffed Chicken Parmigiana</dish>, and I also recommend the
<dish>tiramisu</dish>.</restaurant> 

Exercise 2

edit

Let's assume we want to create a personnel file for a smaller company. What kind of data do we have? Analyse the data from following table. Our goal is to transform it into a markup file. Name of the company: 'Exercises inc.'

Answer

edit

Submitted by Stefan Meyer (Team 1)

<company>
<company_name>
Exercises inc.
</company_name>
<department>
<department_name>
finance and accounting
</department_name>
<person>
<firstname>Tobias</firstname>
<lastname>Boeswald</lastname>
<street>Laxenburger str. 384</street>
<city>Vienna</city>
<country>Austria</country>
<date_of_birth>02/07/1974</date_of_birth>
<phone_nr>0431/3445346</phone_nr>
<department>finance and accounting</department>
<title>Accountant</title>
</person>
<person>
<firstname>Dimitri</firstname>
<lastname>Felber</lastname>
<street>Neuburger str. 19a</street>
<city>Passau</city>
<country>Germany</country>
<date_of_birth>05/12/1967</date_of_birth>
<phone_nr>00498510/523456</phone_nr>
<department>finance and accounting</department>
<title>CFO</title>
</person>
</department>
<department>
<department_name>
human resources
</department_name>
<person>
<firstname>Stefan</firstname>
<lastname>Meyer</lastname>
<street>Breite Gasse 10</street>
<city>Nuremberg</city>
<country>Germany</country>
<date_of_birth>10/09/1972</date_of_birth>
<phone_nr>00499110/45365</phone_nr>
<department>human resources</department>
<title>HR Manager</title>
</person>
</department>
</company>