Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 © 2005-2006 The ATHENA Consortium. XML, eXtensible Markup Language (1) The format for structured information exchange. –Primary structuring is containment.

Similar presentations


Presentation on theme: "1 © 2005-2006 The ATHENA Consortium. XML, eXtensible Markup Language (1) The format for structured information exchange. –Primary structuring is containment."— Presentation transcript:

1 1 © 2005-2006 The ATHENA Consortium. XML, eXtensible Markup Language (1) The format for structured information exchange. –Primary structuring is containment and sequence. –A valid XML document is a tree Alice Smith 123 Maple Street … Robert Smith … Hurry, my lawn is going wild! Lawnmower 1 148.95 Confirm this is electric …

2 2 © 2005-2006 The ATHENA Consortium. XML tree structure Root purchaseOrder @orderDate 1999-10-20 shipTo items comment name @country street state city zip billTo name @country street state city zip Mill Valley 123 Maple Street CA Alice Smith US 90952Old Town 8 Oak Avenue PA Robert Smith US 95819 Hurry, my lawn is going wild! item productName @partNum quantity USPrice 148.95 1 Lawnmower 872 -AA comment Confirm this is electric shipDate 1999- 05-21 … item …

3 3 © 2005-2006 The ATHENA Consortium. XML document

4 4 © 2005-2006 The ATHENA Consortium. XML, eXtensible Markup Language (2) Alice Smith 123 Maple Street … Robert Smith … Hurry, my lawn is going wild! Lawnmower 1 148.95 Confirm this is electric … The format for structured information exchange. –Primary structuring is containment and sequence. –A valid XML document is a tree Extensible – anyone can “coin” markup tags Is an application of SGML, the Structured Markup Language –a standard for marking- up documents Can be edited with any text editor

5 5 © 2005-2006 The ATHENA Consortium. XML Schema …. Defines a class of documents –Allowed structure, content and constraints –An XML document can be an instance of the schema class Uses XML syntax –Can use XML tools to process it Has a large set of pre- defined simple data-types that can be extended. Instances can be validated against the schema

6 6 © 2005-2006 The ATHENA Consortium. XML in document exchange Standard Lawnmower 872-AA Lawnmower 872-AA... LineItem database table: databasedatabase XML

7 7 © 2005-2006 The ATHENA Consortium. Database and database schema movieNamereleaseYeardirector Annie Hall1977Woody Allen Dr. Strangelove1964Stanley Kubrick movieNameactor Annie HallWoody Allen Annie HallDiane Keaton Dr. StrangelovePeter Sellers Movie: Starred: Movie (movieName, releaseYear, director) Starred (movieName, actor) Example based on p. 5 of “Information Modeling and Relational Databases” by Terry Halpin, 2001

8 8 © 2005-2006 The ATHENA Consortium. Questions 3.1 1.What is one of the primary purposes of XML? 2.What is one of the primary purposes of XML Schema? 3.What do databases and XML have in common? That completes the topic of XML, now for some questions:

9 9 © 2005-2006 The ATHENA Consortium. Answers 3.1 1.What is one of the primary purposes of XML? –To exchange structured data 2.What is one of the primary purposes of XML Schema? –To define a class of documents –To validate an XML document as an instance of the class 3.What do databases and XML have in common? –Structured information –Schemas –Constraints


Download ppt "1 © 2005-2006 The ATHENA Consortium. XML, eXtensible Markup Language (1) The format for structured information exchange. –Primary structuring is containment."

Similar presentations


Ads by Google