cis 451: introduction to xml dr. ralph d. westfall october, 2011
TRANSCRIPT
![Page 1: CIS 451: Introduction to XML Dr. Ralph D. Westfall October, 2011](https://reader036.vdocuments.us/reader036/viewer/2022072014/56649e8e5503460f94b9120a/html5/thumbnails/1.jpg)
CIS 451: Introduction to XML
Dr. Ralph D. WestfallOctober, 2011
![Page 2: CIS 451: Introduction to XML Dr. Ralph D. Westfall October, 2011](https://reader036.vdocuments.us/reader036/viewer/2022072014/56649e8e5503460f94b9120a/html5/thumbnails/2.jpg)
ML = Mark Up example: hand written comments
by grader in an English composition class spelling and grammar corrections delete material add words move material to another location put words in italics
![Page 3: CIS 451: Introduction to XML Dr. Ralph D. Westfall October, 2011](https://reader036.vdocuments.us/reader036/viewer/2022072014/56649e8e5503460f94b9120a/html5/thumbnails/3.jpg)
XML Is a Markup Language markup languages tell how to format text proprietary markup languages
word processors e.g. Word, WordPerfect binary (can't use in different systems
[PC won't work in Mac] [download example])
open markup languages (public domain) SGML, rich text (rtf), HTML
text-based (works with any system) in Word, can save as rich text, then open in
Notepad (example)
![Page 4: CIS 451: Introduction to XML Dr. Ralph D. Westfall October, 2011](https://reader036.vdocuments.us/reader036/viewer/2022072014/56649e8e5503460f94b9120a/html5/thumbnails/4.jpg)
Markup Language Features stylistic (appearance) e.g.
<i><b><u> structural (layout) e.g. <p><br><h2> semantic (meaning/description) e.g.
<title><meta name=keywords content = " …... " >
functional (interactive) e.g. <a href = "[link]">click here</a> <input type = "submit" />
![Page 5: CIS 451: Introduction to XML Dr. Ralph D. Westfall October, 2011](https://reader036.vdocuments.us/reader036/viewer/2022072014/56649e8e5503460f94b9120a/html5/thumbnails/5.jpg)
Markup Language Components Example: <b>Hello</b>
<b> = start tag </b> = end tag Hello = content (or data) < > = delimiter characters (identify
tags) <b>Hello</b> = element
element = tags + content
![Page 6: CIS 451: Introduction to XML Dr. Ralph D. Westfall October, 2011](https://reader036.vdocuments.us/reader036/viewer/2022072014/56649e8e5503460f94b9120a/html5/thumbnails/6.jpg)
ML Components - 2 Attributes - Example:
<img src="tbird.jpg" align="right" alt = "57 T-Bird">
name/value pairs identify attributes (source, alignment, alternate text), and give values for each
![Page 7: CIS 451: Introduction to XML Dr. Ralph D. Westfall October, 2011](https://reader036.vdocuments.us/reader036/viewer/2022072014/56649e8e5503460f94b9120a/html5/thumbnails/7.jpg)
SGML: Mother of All MLs can be used for publishing almost anything
mathematics, chemistry, patent office, electronics industry, aerospace industry, UNIX documentation, dictionaries
very complex, very hard to use use is limited (specialized applications) and
new applications are generally in XML can be used to write other markup
languages such as XML
![Page 8: CIS 451: Introduction to XML Dr. Ralph D. Westfall October, 2011](https://reader036.vdocuments.us/reader036/viewer/2022072014/56649e8e5503460f94b9120a/html5/thumbnails/8.jpg)
HTML Derived From SGML is an "application" of, defined in
SGML adapted to Internet simplified - fewer features much easier to learn and use
aspects inherited from SGML open text, not binary (cross-platform)
![Page 9: CIS 451: Introduction to XML Dr. Ralph D. Westfall October, 2011](https://reader036.vdocuments.us/reader036/viewer/2022072014/56649e8e5503460f94b9120a/html5/thumbnails/9.jpg)
Limitations of HTML limited number of tags
not extensible, so users can't add tags very little meaning (other than <title>
and <meta> tags) it is "flat" – it can't identify element
relationships such as (like class variables): name = first name + last name customer = name + address (street +
city + etc.)
![Page 10: CIS 451: Introduction to XML Dr. Ralph D. Westfall October, 2011](https://reader036.vdocuments.us/reader036/viewer/2022072014/56649e8e5503460f94b9120a/html5/thumbnails/10.jpg)
HTML Limitation Implications sometimes can't do what want to do
limited number of tags difficult to use content for applications
computers can't "understand" content leads to higher network traffic volumes
on Internet, intranets send whole page when only part is needed
![Page 11: CIS 451: Introduction to XML Dr. Ralph D. Westfall October, 2011](https://reader036.vdocuments.us/reader036/viewer/2022072014/56649e8e5503460f94b9120a/html5/thumbnails/11.jpg)
XML Is Better better than SGML
80% of capabilities, 20% of complexity Pareto's principle small enough to be supported by browser
vendors explicitly includes hyperlinking supports style sheets
better than HTML extensible (can create your own tags) tags identify content e.g. item and its price
![Page 12: CIS 451: Introduction to XML Dr. Ralph D. Westfall October, 2011](https://reader036.vdocuments.us/reader036/viewer/2022072014/56649e8e5503460f94b9120a/html5/thumbnails/12.jpg)
Other XML Advantages "XML is about data" (not locked into
format) e.g. <ol> formats as a numbered list, but
might want a different format e.g. table slsrcpt.xml, slsrcpt.html, slsrcpt2.html
(View>Source on HTML files) much better searching
can search for meaning, not just content computer (name/model) price < $700
data interchange e.g. "legacy applications"
![Page 13: CIS 451: Introduction to XML Dr. Ralph D. Westfall October, 2011](https://reader036.vdocuments.us/reader036/viewer/2022072014/56649e8e5503460f94b9120a/html5/thumbnails/13.jpg)
Design Goals for XML easy to use through the Internet support a wide variety of applications compatible with SGML easy to write programs that access XML avoid optional features (compatibility) XML should be readable by humans
![Page 14: CIS 451: Introduction to XML Dr. Ralph D. Westfall October, 2011](https://reader036.vdocuments.us/reader036/viewer/2022072014/56649e8e5503460f94b9120a/html5/thumbnails/14.jpg)
Design Goals for XML - 2 XML specifications formal and
concise XML documents easy to create clarity more important than brevity
from Pardi, 1999
![Page 15: CIS 451: Introduction to XML Dr. Ralph D. Westfall October, 2011](https://reader036.vdocuments.us/reader036/viewer/2022072014/56649e8e5503460f94b9120a/html5/thumbnails/15.jpg)
Creating XML Documents very similar to writing HTML,
except you make up your own tags <?xml version="1.0"?><!--required--> <books><!--root element--> <textbooks> <title>Beginning ASP.NET</title> <!--other items--> </textbooks> </books>
![Page 16: CIS 451: Introduction to XML Dr. Ralph D. Westfall October, 2011](https://reader036.vdocuments.us/reader036/viewer/2022072014/56649e8e5503460f94b9120a/html5/thumbnails/16.jpg)
An XML "Hierarchy" (Outline) textbooks (root element)
book (repeating element) title ISBN authors
author_name (repeating element) description price
![Page 17: CIS 451: Introduction to XML Dr. Ralph D. Westfall October, 2011](https://reader036.vdocuments.us/reader036/viewer/2022072014/56649e8e5503460f94b9120a/html5/thumbnails/17.jpg)
Exercise get a business form (Business Nation)
Pre-Employment Checklist Form create an XML file
can use pattern on slide 19 make sure all start tags have end tags
save with .xml extension view in Internet Explorer save file for use again (next lectures)