CIMI XML Schema for SPECTRUM
collected this water.</comments> <object-number>whitsands-bay</object-number> <object-title> <title>Whitesand Bay at St. David's, Wales</title> </object-title> </identification> <reproduction> <location>http://infomotions.com/gallery/water/Images/0.jpg</location> <type>image/jpeg</type> </reproduction> </object> </data> <metadata/> </record> </interchange>
Exercise - Updating and validating an XML file with an XML schema
In this exercise you will validate an XML file against an XML schema, and then you will edit the XML document.
Create a new directory on your computer's desktop.
Copy all the *.dll files from the CD to your newly created directory.
Copy all the *.exe files from the CD to your newly created directory.
Copy all the *.xsd files from the CD to your newly created directory.
Save the file named water.xml to the newly created directory.
Open a new terminal window by running cmd.exe from the Start menu's Run command.
Validate water.xml using xmllint program: xmllint --schema schema-v1.5.xsd water.xml .
Open the water.xml in your text editor.
Copy the entire contents of one of the file's record elements.
Add an additional record to the XML file by pasting the contents of the clipboard after the last re-
Change the values of the record's forename, initials, and surname.
Change the value of record's comments and object-number.
Validate your edits by running the xmllint program again.
If errors occur, then read the error messages and try to fix the problem(s). Otherwise, add some
more records to the file, read the XSD file and try to add some data to the metadata elements of wa- ter.xml, or run the xmllint program without any command line options to learn more about what xmllint can do.