CSE 444, Winter 2003

Questionnaire: due Wednesday, January 8

This is just a warm-up to get some basic information about you, to create a test-bed for some later homework, and to give you some flavor of XML, which will be one of our focuses in this class.

Don't be intimidated if you know nothing about XML. You can simply look at the example file we created and tailor it to the data about yourself.

XML is a standard format for sharing data among applications. We will be using XML a lot during the course, so you might as well learn something about it. It's very easy. Here is a good tutorial on XML. You don't need to go through it and learn XML all by yourself. Simply get some idea of what on earth XML is and have a glance at XML syntax.

A good way to learn XML is to write it by yourself. Fill in the questionnaire in an XML file. Follow the sample XML file and replace it with your personal information. Detailed comments are given in the form of <!-- comments --> in the sample. Below is a DTD presenting the XML file structure. (We'll learn more about DTD's later in the course). However, you can succeed in writing your XML file even without understanding it. If you want to see what an XML file looks like in IE browser, click here. (It's the same file, just with an .xml suffix).

Now you've got it! Believe me, you'll become an XML expert very soon!

Please turn in your XML file (as an attachment) by email to Eric Chu. Make sure that the XML file you turn in is well structured. That is, every open-tag has a corresponding close-tag.

DTD for questionnaire:

<!ELEMENT student (stuID, name, gender, birthday, birthplace, phone, address+, email+, homepage?, education, favoriteCourse+, sports-played*, interest*, friends)>
<!ELEMENT name (lastName, firstName)>
<!ELEMENT birthday (day, month, year)>
<!ELEMENT phone (home, cell?, fax?)>
<!ELEMENT address (street, city, state, zip)>
<!ELEMENT education (department, university)>
<!ELEMENT favoriteCourse (courseNo, courseName)>
<!ELEMENT friends (in-class*, out-of-class+)>
<!ELEMENT lastName (#PCDATA)>
<!ELEMENT firstName (#PCDATA)>
<!ELEMENT gender (#PCDATA)>
<!ELEMENT month (#PCDATA)>
<!ELEMENT birthplace (#PCDATA)>
<!ELEMENT street (#PCDATA)>
<!ELEMENT state (#PCDATA)>
<!ELEMENT email (#PCDATA)>
<!ELEMENT homepage (#PCDATA)>
<!ELEMENT department (#PCDATA)>
<!ELEMENT university (#PCDATA)>
<!ELEMENT courseNo (#PCDATA)>
<!ELEMENT courseName (#PCDATA)>
<!ELEMENT sports-played (#PCDATA)>
<!ELEMENT interest (#PCDATA)>
<!ELEMENT in-class (#PCDATA)>
<!ELEMENT out-of-class (#PCDATA)>