SENG 422 Lab 5 An Introduction to XML Time: ELW B220 from (4:00 - 6:50) every Tuesday TA: Philip Baback Alipour Ph.D. Candidate in Electrical, Computer Engineering and Quantum Physics, Dept. of Electrical and Computer Engineering, University of Victoria, CA Email: [email protected] Office: ELW Room # A358 SENG 422 Lab 5 An Introduction to XML - XML, or Extensible Markup Language is a markup language using which you can create your own tags. - XML was created to overcome the shortcomings of HTML WHY XML? -HTML was designed for humans not machines (high level representation of data). -In HTML browser just follows the instructions and does not understand the content (information traversing across www). WHY XML? - XML Separates Data from HTML - XML Simplifies Data; SharingXML Simplifies Data Sharing - XML Simplifies Platform Changes A Comparison XML Separates Data from HTML An Example - A tag is the text between the brackets (<) and (>). Such as <greeting> and </greeting>) - An element is the starting tag, the ending tag, and everything in between. - An attribute is a name-value pair inside the starting tag of an element. In this example, state is an attribute of the <city> element. Some Rules - The root element: Everything should be inside one element - No overlapping between elements - End tags are required - Elements are case sensitive Data Definition Two Methods: - Document Type Definition - XML Schema XML Schema - XML schemas use XML syntax - XML schemas support data types - XML schemas are extensible - XML schemas have more expressive power Schema Example r Schema Example r Assignment Create a schema for a checklist. It may contain the following: - Surveyor ID - Location - Weather - Last Modification Date
© Copyright 2026 Paperzz