X hits on this document

414 views

0 shares

1 downloads

0 comments

77 / 142

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.

  • 1.

    Create a new directory on your computer's desktop.

  • 2.

    Copy all the *.dll files from the CD to your newly created directory.

  • 3.

    Copy all the *.exe files from the CD to your newly created directory.

  • 4.

    Copy all the *.xsd files from the CD to your newly created directory.

  • 5.

    Save the file named water.xml to the newly created directory.

  • 6.

    Open a new terminal window by running cmd.exe from the Start menu's Run command.

  • 7.

    Validate water.xml using xmllint program: xmllint --schema schema-v1.5.xsd water.xml .

  • 8.

    Open the water.xml in your text editor.

  • 9.

    Copy the entire contents of one of the file's record elements.

  • 10.

    Add an additional record to the XML file by pasting the contents of the clipboard after the last re-

cord element.

  • 11.

    Change the values of the record's forename, initials, and surname.

  • 12.

    Change the value of record's comments and object-number.

  • 13.

    Validate your edits by running the xmllint program again.

  • 14.

    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.

69

Document info
Document views414
Page views420
Page last viewedTue Dec 06 12:24:54 UTC 2016
Pages142
Paragraphs3126
Words34660

Comments