Sunday, April 4, 2010

Exercise 8 - XML Introduction

Create an XML document for an online catalogue of cars where each car has the child elements of make, model, year, colour, engine, number_of_doors, transmission_type and accessories. The engine has child elements called number_of_cylinders and fuel_system.

Below is the XML for which to store the online catalogue of cars to the XML flat file database. There can be a number of improvements made on this XML file.

1. Create a schema to validate the data being entered into the XML, so that only correct values are being stored (i.e. only numerical years are being entered into the year element and are 4 characters in length)

2. Some elements can be made attributes of certain other elements, car element is always going to have a year, colour, make, model. These can be added to <car year='' colour='' make='' model=''>


No comments:

Post a Comment