seng 422 lab 5 an introduction to xml time: elw b220 from (4:00 - 6:50) every tuesday ta: philip...
TRANSCRIPT
![Page 1: 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](https://reader036.vdocuments.mx/reader036/viewer/2022062518/56649ea25503460f94ba6a96/html5/thumbnails/1.jpg)
SENG 422 Lab 5 An Introduction to XML
Time: ELW B220 from (4:00 - 6:50) every TuesdayTA: 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
![Page 2: 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](https://reader036.vdocuments.mx/reader036/viewer/2022062518/56649ea25503460f94ba6a96/html5/thumbnails/2.jpg)
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
![Page 3: 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](https://reader036.vdocuments.mx/reader036/viewer/2022062518/56649ea25503460f94ba6a96/html5/thumbnails/3.jpg)
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).
![Page 4: 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](https://reader036.vdocuments.mx/reader036/viewer/2022062518/56649ea25503460f94ba6a96/html5/thumbnails/4.jpg)
WHY XML?
- XML Separates Data from HTML
- XML Simplifies Data; SharingXML Simplifies Data Sharing
- XML Simplifies Platform Changes
![Page 5: 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](https://reader036.vdocuments.mx/reader036/viewer/2022062518/56649ea25503460f94ba6a96/html5/thumbnails/5.jpg)
A Comparison
XML Separates Data from HTML
![Page 6: 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](https://reader036.vdocuments.mx/reader036/viewer/2022062518/56649ea25503460f94ba6a96/html5/thumbnails/6.jpg)
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.
![Page 7: 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](https://reader036.vdocuments.mx/reader036/viewer/2022062518/56649ea25503460f94ba6a96/html5/thumbnails/7.jpg)
Some Rules
- The root element: Everything should be inside one element
- No overlapping between elements
- End tags are required
- Elements are case sensitive
![Page 8: 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](https://reader036.vdocuments.mx/reader036/viewer/2022062518/56649ea25503460f94ba6a96/html5/thumbnails/8.jpg)
Data Definition
Two Methods:
- Document Type Definition
- XML Schema
![Page 9: 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](https://reader036.vdocuments.mx/reader036/viewer/2022062518/56649ea25503460f94ba6a96/html5/thumbnails/9.jpg)
XML Schema
- XML schemas use XML syntax
- XML schemas support data types
- XML schemas are extensible
- XML schemas have more expressive power
![Page 10: 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](https://reader036.vdocuments.mx/reader036/viewer/2022062518/56649ea25503460f94ba6a96/html5/thumbnails/10.jpg)
Schema Example
r
![Page 11: 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](https://reader036.vdocuments.mx/reader036/viewer/2022062518/56649ea25503460f94ba6a96/html5/thumbnails/11.jpg)
Schema Example
r
![Page 12: 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](https://reader036.vdocuments.mx/reader036/viewer/2022062518/56649ea25503460f94ba6a96/html5/thumbnails/12.jpg)
Assignment
Create a schema for a checklist. It may contain the following:
- Surveyor ID
- Location
- Weather
- Last Modification Date