Download presentation
Presentation is loading. Please wait.
Published bySydney Cox Modified over 9 years ago
2
Module Road Map
3
Assignment Road Map Notice we have linked the conduit directly to the presentation layer. This is normally a bad idea!
4
Credit Categories Assignment 2 – 1 2 3
5
Introduction to XML How do we make all of these diverse technologies work together? Extensible Mark-up Language (XML) Origins in SGML (Standard Generalised Mark-up Language) Late 1980 early 90s Tim Berners-Lee working in Switzerland devised the first specification for HTML based on SGML
6
Simple HTML Document Rendered as… Tags mark-up the content…
7
Problems with HTML The tags were defined as part of the language specification Different browsers added new features to the language in order to compete Browser wars
8
The Marquee Tag
9
World Wide Web Consortium (W3C) Devise standards and software related to the World Wide Web Greater standardisation was applied to HTML leading to XML
10
XML A meta-language - data about data May be used to define other mark-up languages XML may be used in many other non web related contexts (Office Documents) Allows us to split data from presentation
11
Media Centre Master Tool to manage films saved as DivX files Creation of scan folders Communicates with the Internet Movie Database Web service Web page versus web document
12
Viewed in Windows Media Centre
13
Viewed at IMDB
14
Tags in XML XML doesn’t define a large range of tags If we want to create a new tag in XML we don’t need to wait for a new version of the language XML allows us define our own mark-up languages XHTML (eXtensible HyperText Markup Language)
15
XHTML Document Type Definition contains a set of rules that define what are allowable tags in an XHTML file
16
IMDB XML
17
The XML Declaration The top line of the file reads as follows... XML Version (1.0 or 1.1 – only interested in 1.0) Encoding – utf-8
18
Encoding Everything we see on a computer is internally represented as binary data ASCII (American Standard Code for Information Interchange) UNICODE 65Uppercase A 66Uppercase B 67Uppercase C 68Uppercase D 69Uppercase E 70Uppercase F 41Uppercase A 42Uppercase B 43Uppercase C 44Uppercase D 45Uppercase E 46Uppercase F How do we translate the following? - 46, 41, 44, 45
19
The Root Element A tag that encloses all of the data in the file and must not be empty XML file for 28 Days Later has a root element of
20
Elements 28 Days Later Opening tag Closing tag Data28 Days Later
21
Attributes and Values Added to elements to include additional data (Modified structure to illustrate attributes and values)
22
Five Rules of XML 1. Tag names are case sensitive This is ok... 28 Days Later This is not... 28 Days Later These are two different tags 28 Days Later
23
Five Rules of XML 2. Every opening tag must have a closing tag This is good... 28 Days Later This is bad... 28 Days Later
24
Five Rules of XML 3. A nested tag pair cannot overlap another tag GoodBad Alex Palmer Actor Activist Alex Palmer Actor Activist
25
Five Rules of XML 4. Attribute values must appear within quotes Good... Bad...
26
Five Rules of XML 5. Every document must have a root element
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.