CS 312 - Internet Concepts
Fall 2011: Tues/Thurs 3-4:15pm, Dragas 1117

Announcements

Staff

Schedule

Syllabus

Useful Links

XML Lab Days

November 8-10, 2011

Setup

If you haven't done this previously:

Create a new directory ~/public_html/cs312/labs for your lab exercises and set the permissions so that it the web server (anyone) can access it (chmod 755 ~/public_html/cs312/labs).

Create a new directory ~/public_html/cs312/labs/xml/ for today's exercises. Don't forget to set the permissions on the new directory (chmod 755 ~/public_html/cs312/labs/xml/).

Submission

As you complete each lab exercise, let me know and I'll come check it out.

Debugging

  • Firefox: Tools > Error Console
  • Chrome: View > Developer > JavaScript Console

Lab Exercises

1) Editing an XML file

Download the file books.xml to ~/public_html/cs312/labs/xml/.

Set the permissions on the file to 644.

Using a text editor, add entries for the following books to the XML file:

 bk112
 Beautiful Visualization: Looking at Data through the Eyes of Experts
 Julie Steele and Noah Iliinsky
 Computer
 49.89
 2010-06-28
 This book examines the methods of two dozen visualization experts who approach
 their projects from a variety of perspectives -- as artists, designers, commentators, 
 scientists, analysts, statisticians, and more. 

 bk113
 Data Analysis with Open Source Tools
 Philipp K. Janert
 Computer
 24.34
 2010-11-25
 Author Philipp Janert teaches you how to think about data: how to effectively approach 
 data analysis problems, and how to extract all of the available information from your data. 

After adding the entries, check your work by copy/pasting the contents of the file into the XML validator.

2) XML Display

Write XHTML and JavaScript code to display a table with the author, title, genre, and price fields of all items in the XML file.

Hint: See the plant-table.html example from the XML lecture? (starting at slide 45).