Intro to XML

802 views

Published on

Introduction to Extensible Markup Language

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
802
On SlideShare
0
From Embeds
0
Number of Embeds
135
Actions
Shares
0
Downloads
25
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Intro to XML

  1. 1. Intro to XML<br />CIS-189<br />
  2. 2. Computers work with data represented by binary values<br />0, 1 represent possible “states” (values) of a switch (off and on)<br />Operating systems and application software represent values differently<br />A Word file storing information about this class will store the data differently than WordPad<br />Working with Data<br />
  3. 3. Text data uses common definitions for representing data<br />Letter ‘a’ is 97 (110001 in binary)<br />A text file with information about this class can be read and used by Word, Wordpad, Excel, Internet Explorer<br />Using Text<br />
  4. 4. “Markup” refers to the use of tags to describe data<br />Data describing data is meta data<br />Tags identify where data begins and ends, and has some information about that data<br />Often referred to as “self describing”<br />Standard Generalized Markup Language was created to offer universal standards for sharing and moving information<br />Markup<br />
  5. 5. HTML is an offshoot of SGML<br />Designed to support display of data<br />Not as complex – or as powerful – as SGML<br />Text-based allows for reading and editing in many environments, applications<br />Designed to be used explicitly with a browser<br />Text values have fewer security issues than passing binary data <br />What do all of those 0’s and 1’s represent?<br />HTML<br />
  6. 6. Extensible Markup Language fills the gap between display of HTML and complexity of SGML<br />XML is compatible with rules of SGML<br />XML isn’t a language<br />XML is a set of standards about how to create a language to define and work with particular data<br />To XML<br />
  7. 7. Tags are used, similar to HTML<br />Tags mark the beginning and ending of a value<br />A tag must always have a close<br /><name>Randy</name><br />OR<br /><middle /><br />Tags are defined as needed<br />No set of predefined tags as in HTML<br />Tags typically aren’t about display<br />Presentation is separate from the data, unlike HTML<br />Using XML<br />
  8. 8. XML is hierarchical<br />Individual items in XML are elements<br />An item may be a single value or group of values<br />One element can belong to another<br />Child and parent<br />Similar to a one-to-many relationship<br />Structure is called a ‘tree’ <br />An item with children is called a branch<br />An item with no children is a leaf<br />XML Structure<br />
  9. 9. An element can contain data<br />An element can contain other elements<br />An element can contain data and other elements<br />Definition of elements for specific data make up a vocabulary<br />Elements<br />
  10. 10. Can define structure of data, independent of specific values<br />Document type definitions(DTD’s) and schemas are used to create definitions<br />Data isn’t part of a DTD or schema<br />Can use definitions to test values<br />Description of data can include validation<br />Defining Elements<br />
  11. 11. Every start tag must end<br />Tags cannot overlap<br />One tag can contain another<br />Can have/must have one root element<br />Must obey naming rules<br />XML is case sensitive<br />Whitespace is considered part of the data<br />Not stripped out like for HTML<br />Rules for Elements<br />

×