Web Programming Work: Exercise 1: Write an XML document describing the exercises in this document: the root element is . The root has an attribute number that has value 1. The root element has three child elements; that contains as text the date of the exercise, and two elements for the first two exercises (1--2). Write some text in the elements. Exercise 2: Write an XML document describing a person: name, occupation, address and hobbies. Please do not use your own information, you can use fake data. Decide on suitable element names and nesting. Check your document for well-formedness. Answer: OskariHeinonen assistant Univ. of Helsinki, Dept. of Computer Science P.O. Box 68Gustaf Hällströmin katu 2b FI-00014University of Helsinki eatingsleeping Exercise 3: Draw a tree that represents the XML document you created in task 2. Exercise 4: This is the books.xml file The Autobiography of Benjamin Franklin Benjamin Franklin 8.99 The Confidence Man Herman Melville 11.99 The Gorgias Plato 9.99 Using books.xml as a model, create a small xml file for a student's program of study form called programOfStudy.xml. It should capture the following data: In the Fall 2008 semester, the student plans to take two classes to satisfy her General Education requirements, PHIL 101 to satisfy Goal 8 and ECON 201 to satisfy Goal 11. She also has to take one core course, MGT 217, and two major courses, CIS 120 and CIS 403. In the Spring 2009 semester, she plans to take two additional core courses, MGT 261 and MKTG 325, as well as three major courses, CIS 220, CIS 407, and CIS 490.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Web Programming Work:

Exercise 1:

Write an XML document describing the exercises in this document: the root element is <exercises>. The root has an attribute number that has value 1. The root element has three child elements; <date> that contains as text the date of the exercise, and two <item> elements for the first two exercises (1--2). Write some text in the <item> elements.

Exercise 2:

Write an XML document describing a person: name, occupation, address and hobbies. Please do not use your own information, you can use fake data. Decide on suitable element names and nesting. Check your document for well-formedness.

Answer:

<?xml version="1.0" encoding="iso-8859-1"?>
<person>

<name><gname>Oskari</gname><fname>Heinonen</fname></name>
<occup>assistant</occup>
<address>

<affil>Univ. of Helsinki, Dept. of Computer Science</affil>
<pbox>P.O. Box 68</pbox><street>Gustaf Hällströmin katu 2b</street>
<pcode>FI-00014</pcode><plocale>University of Helsinki</plocale>

</address>
<hobbies><hobby>eating</hobby><hobby>sleeping</hobby></hobbies>

</person>

Exercise 3:

Draw a tree that represents the XML document you created in task 2.

Exercise 4:

This is the books.xml file

<?xml version='1.0'?>
<!-- This file represents a fragment of a book store inventory database -->
<bookstore>

<book genre="autobiography" publicationdate="1981" ISBN="1-861003-11-0">

<title>The Autobiography of Benjamin Franklin</title>
<author>

<first-name>Benjamin</first-name>
<last-name>Franklin</last-name>

</author>

<price>8.99</price>

</book>

<book genre="novel" publicationdate="1967" ISBN="0-201-63361-2">

<title>The Confidence Man</title>

<author>

<first-name>Herman</first-name>
<last-name>Melville</last-name>

</author>

<price>11.99</price>

</book>

<book genre="philosophy" publicationdate="1991" ISBN="1-861001-57-6">

<title>The Gorgias</title>
<author>

<name>Plato</name>

</author>

<price>9.99</price>

</book>

</bookstore>

Using books.xml as a model, create a small xml file for a student's program of study form called programOfStudy.xml. It should capture the following data:

In the Fall 2008 semester, the student plans to take two classes to satisfy her General Education requirements, PHIL 101 to satisfy Goal 8 and ECON 201 to satisfy Goal 11. She also has to take one core course, MGT 217, and two major courses, CIS 120 and CIS 403.

In the Spring 2009 semester, she plans to take two additional core courses, MGT 261 and MKTG 325, as well as three major courses, CIS 220, CIS 407, and CIS 490.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 6 steps

Blurred answer
Knowledge Booster
Elements and Tags
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education