Presentation is loading. Please wait.

Presentation is loading. Please wait.

CIS 451: Introduction to XML Dr. Ralph D. Westfall October, 2011.

Similar presentations


Presentation on theme: "CIS 451: Introduction to XML Dr. Ralph D. Westfall October, 2011."— Presentation transcript:

1 CIS 451: Introduction to XML Dr. Ralph D. Westfall October, 2011

2 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

3 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])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)example

4 Markup Language Features stylistic (appearance) e.g. structural (layout) e.g. semantic (meaning/description) e.g. functional (interactive) e.g. click here

5 Markup Language Components Example: Hello = start tag = end tag Hello = content (or data) = delimiter characters (identify tags) Hello = element element = tags + content

6 ML Components - 2 Attributes - Example: name/value pairs identify attributes (source, alignment, alternate text), and give values for each

7 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 use is limited (specialized applications) can be used to write other markup languages such as XML

8 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)

9 Limitations of HTML limited number of tags not extensible, so users can't add tags very little meaning (other than and 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.)

10 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

11 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

12 Other XML Advantages "XML is about data" (not locked into format) e.g. 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) slsrcpt.xmlslsrcpt.htmlslsrcpt2.html much better searching can search for meaning, not just content computer (name/model) price < $700 data interchange e.g. "legacy applications"

13 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

14 Design Goals for XML - 2 XML specifications formal and concise XML documents easy to create clarity more important than brevity from Pardi, 1999

15 Creating XML Documents very similar to writing HTML, except you make up your own tags Beginning ASP.NET

16 An XML "Hierarchy" (Outline) textbooks (root element) book (repeating element) title ISBN authors author_name (repeating element) description price

17 Exercise get a business form (Business Nation)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)


Download ppt "CIS 451: Introduction to XML Dr. Ralph D. Westfall October, 2011."

Similar presentations


Ads by Google