1 XML eXtensible Markup Language. 2 XML vs. HTML HTML is a HyperText Markup language HTML is a HyperText Markup language Designed for a specific application,

Slides:



Advertisements
Similar presentations
XML-XSL Introduction SHIJU RAJAN SHIJU RAJAN Outline Brief Overview Brief Overview What is XML? What is XML? Well Formed XML Well Formed XML Tag Name.
Advertisements

What is XML? a meta language that allows you to create and format your own document markups a method for putting structured data into a text file; these.
1 DTD (Document Type Definition) Imposing Structure on XML Documents (W3Schools on DTDs)W3Schools on DTDs.
History Leading to XHTML
1 XML Data Management 2. XML Syntax Werner Nutt. 2 HTML Designed for publishing hypertext on the Web Describes how a browser should arrange text, images,
XHTML 16-Apr-17.
CS 898N – Advanced World Wide Web Technologies Lecture 21: XML Chin-Chih Chang
1 Lecture 10 XML Wednesday, October 18, XML Outline XML (4.6, 4.7) –Syntax –Semistructured data –DTDs.
17-Jun-15 XHTML 2 What is XHTML? XHTML stands for Extensible Hypertext Markup Language XHTML is aimed to replace HTML.
Extensible Markup Language XML MIS 520 – Database Theory Fall 2001 (Day) Lecture 14.
1 COS 425: Database and Information Management Systems XML and information exchange.
Creating a Well-Formed Valid Document. 2 Objectives Introducing XHTML Creating a Well-Formed Document Creating a Valid Document Creating an XHTML Document.
XML eXtensible Markup Language.
1 XML and Databases. 2 Outline (ambitious) Background: documents (SGML/HTML) and databases (structured and semistructured data) XML Basics and Document.
XML(EXtensible Markup Language). XML XML stands for EXtensible Markup Language. XML is a markup language much like HTML. XML was designed to describe.
Tutorial 11 Creating XML Document
Upgrading to XHTML DECO 3001 Tutorial 1 – Part 1 Presented by Ji Soo Yoon 19 February 2004 Slides adopted from
1 Lecture 08: XML and Semistructured Data. 2 Outline XML (Section 17) –XML syntax, semistructured data –Document Type Definitions (DTDs) XPath.
Introducing XHTML: Module B: HTML to XHTML. Goals Understand how XHTML evolved as a language for Web delivery Understand the importance of DTDs Understand.
Introduction to XML This material is based heavily on the tutorial by the same name at
1 Advanced Topics XML and Databases. 2 XML u Overview u Structure of XML Data –XML Document Type Definition DTD –Namespaces –XML Schema u Query and Transformation.
Topics The "bigger picture" –The "XML sales pitch" –XML/XHTML vs. SGML/HTML –XML in electronic publishing –XML and the future, web 2.0 XML basics: –Building.
4/20/2017.
XML – Extensible Markup Language Sivakumar Kuttuva & Janusz Zalewski.
XP Tutorial 9New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Working with XHTML Creating a Well-Formed Valid Document Tutorial 9.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 XML Taken from Chapter 7.
XML Anisha K J Jerrin Thomas. Outline  Introduction  Structure of an XML Page  Well-formed & Valid XML Documents  DTD – Elements, Attributes, Entities.
XML eXtensible Markup Language by Darrell Payne. Experience Logicon / Sterling Federal C, C++, JavaScript/Jscript, Shell Script, Perl XML Training XML.
Lecture 6 of Advanced Databases XML Schema, Querying & Transformation Instructor: Mr.Ahmed Al Astal.
Chapter 10: XML.
TDDD43 XML and RDF Slides based on slides by Lena Strömbäck and Fang Wei-Kleiner 1.
XP 1 CREATING AN XML DOCUMENT. XP 2 INTRODUCING XML XML stands for Extensible Markup Language. A markup language specifies the structure and content of.
Introduction to XML Eugenia Fernandez IUPUI. What is XML? From the World Wide Web Consortium (W3C) The Extensible Markup Language (XML) is the universal.
CISC 3140 (CIS 20.2) Design & Implementation of Software Application II Instructor : M. Meyer Address: Course Page:
XML 1 Enterprise Applications CE00465-M XML. 2 Enterprise Applications CE00465-M XML Overview Extensible Mark-up Language (XML) is a meta-language that.
What is XML?  XML stands for EXtensible Markup Language  XML is a markup language much like HTML  XML was designed to carry data, not to display data.
 XML is designed to describe data and to focus on what data is. HTML is designed to display data and to focus on how data looks.  XML is created to structure,
Intro. to XML & XML DB Bun Yue Professor, CS/CIS UHCL.
1 Chapter 10: XML What is XML What is XML Basic Components of XML Basic Components of XML XPath XPath XQuery XQuery.
XML 2nd EDITION Tutorial 1 Creating An Xml Document.
Waqas Anwar Next SlidePrevious Slide. Waqas Anwar Next SlidePrevious Slide XML XML stands for EXtensible Markup Language.
XML Documents Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University Elements Attributes Comments PI Document.
Introduction to XML This presentation covers introductory features of XML. What XML is and what it is not? What does it do? Put different related technologies.
XML Introduction. What is XML? XML stands for eXtensible Markup Language XML stands for eXtensible Markup Language XML is a markup language much like.
An Introduction to XML Paul Donohue May 8th 2002 Hotel Senator Zürich.
1 IST 210 Organization of Data Database and the Web.
The Semistructured-Data Model Programming Languages for XML Spring 2011 Instructor: Hassan Khosravi.
1 Indexing The syntax for creating a index is: CREATE [UNIQUE] INDEX index_name ON table_name (column1, column2,... column_n) [ COMPUTE STATISTICS ]; Why.
COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 4 1COMP9321, 15s2, Week.
XML A Language Presentation. Outline 1. Introduction 2. XML 2.1 Background 2.2 Structure 2.3 Advantages 3. Related Technologies 3.1 DTD 3.2 Schemas and.
+ 1 XML eXtensible Markup Language. + 2 XML Lecture Adapted from the work of Dr. Praveen Madiraju of Marquette University.
XML CSC1310 Fall HTML (TIM BERNERS-LEE) HyperText Markup Language  HTML (HyperText Markup Language): December  Markup  Markup is a symbol.
Tutorial 9 Working with XHTML. New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition 2 Objectives Describe the history and theory of XHTML.
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved Chapter 7 Representing Web Data:
SEMI-STRUCTURED DATA (XML) 1. SEMI-STRUCTURED DATA ER, Relational, ODL data models are all based on schema Structure of data is rigid and known is advance.
XML – Basic Concepts (modified version from Dr. Praveen Madiraju) 2015, Fall Pusan National University Ki-Joune Li.
XML Extensible Markup Language
XML Introduction to XML Extensible Markup Language.
XML Notes taken from w3schools. What is XML? XML stands for EXtensible Markup Language. XML was designed to store and transport data. XML was designed.
XML – eXtensible Markup Language. The World Wide Web and What We Would Like to Do with It XML has a lot of hype surrounding it This week we discuss: –Why.
1 XML eXtensible Markup Language. 2 Introduction and Motivation Dr. Praveen Madiraju Modified from Dr.Sagiv’s slides.
XML eXtensible Markup Language.
Updated :02 Hong Kong University of Science & Technology Library Workshop on XML-Based Library Applications 1. What is XML?
Extensible Markup Language (XML) Pat Morin COMP 2405.
XML: Extensible Markup Language
XML – Basic Concepts (modified version from Dr. Praveen Madiraju)
Lecture 9: XML Monday, October 17, 2005.
DTD (Document Type Definition)
eXtensible Markup Language
CSE591: Data Mining by H. Liu
Presentation transcript:

1 XML eXtensible Markup Language

2 XML vs. HTML HTML is a HyperText Markup language HTML is a HyperText Markup language Designed for a specific application, namely, presenting and linking hypertext documents Designed for a specific application, namely, presenting and linking hypertext documents XML describes structure and content (“semantics”) XML describes structure and content (“semantics”) The presentation is defined separately from the structure and the content The presentation is defined separately from the structure and the content

3 An Address Book as an XML document Donald Duck Miki Mouse

4 Main Features of XML No fixed set of tags No fixed set of tags New tags can be added for new applications New tags can be added for new applications An agreed upon set of tags can be used in many applications An agreed upon set of tags can be used in many applications Namespaces facilitate uniform and coherent descriptions of data Namespaces facilitate uniform and coherent descriptions of data For example, a namespace for address books determines whether to use or For example, a namespace for address books determines whether to use or

5 Main Features of XML (cont’d) XML has the concept of a schema XML has the concept of a schema DTD and the more expressive XML Schema DTD and the more expressive XML Schema XML is a data model XML is a data model Similar to the semistructured data model Similar to the semistructured data model XML supports internationalization (Unicode) and platform independence (an XML file is just a character file) XML supports internationalization (Unicode) and platform independence (an XML file is just a character file)Unicode

6 XML is the Standard for Data Exchange Web services (e.g., ecommerce) require exchanging data between various applications that run on different platforms Web services (e.g., ecommerce) require exchanging data between various applications that run on different platforms XML (augmented with namespaces) is the preferred syntax for data exchange on the Web XML (augmented with namespaces) is the preferred syntax for data exchange on the Web

7 XML is not Alone XML Schemas strengthen the data-modeling capabilities of XML (in comparison to XML with only DTDs) XML Schemas strengthen the data-modeling capabilities of XML (in comparison to XML with only DTDs) XPath is a language for accessing parts of XML documents XPath is a language for accessing parts of XML documents XLink and XPointer support cross-references XLink and XPointer support cross-references XSLT is a language for transforming XML documents into other XML documents (including XHTML, for displaying XML files) XSLT is a language for transforming XML documents into other XML documents (including XHTML, for displaying XML files) Limited styling of XML can be done with CSS alone Limited styling of XML can be done with CSS alone XQuery is a lanaguage for querying XML documents XQuery is a lanaguage for querying XML documents

8 The Two Facets of XML Some XML files are just text documents with tags that denote their structure and include some metadata (e.g., an attribute that gives the name of the person who did the proofreading) Some XML files are just text documents with tags that denote their structure and include some metadata (e.g., an attribute that gives the name of the person who did the proofreading) See an example on the next slide See an example on the next slide XML is a subset of SGML (Standard Generalized Markup Language) XML is a subset of SGML (Standard Generalized Markup Language) Other XML documents are similar to database files (e.g., an address book) Other XML documents are similar to database files (e.g., an address book)

9 XML can Describe the Structure of a Document TCP/IP Illustrated TCP/IP Illustrated <author><last>Stevens</last><first>W.</first></author><publisher>Addison-Wesley</publisher><price>65.95</price></book>

10 XML Syntax W3Schools Resources on XML Syntax W3Schools Resources on XML Syntax

11 The Structure of XML XML consists of tags and text XML consists of tags and text Tags come in pairs... Tags come in pairs... They must be properly nested They must be properly nested good good bad bad (You can’t do in HTML)

12 A Useful Abbreviation Abbreviating elements with empty contents: for for For example: Lisa Simpson Lisa Simpson... Note that a tag may have a set of attributes, each consisting of a name and a value

13 XML Text XML has only one “basic” type – text It is bounded by tags, e.g., The Big Sleep The Big Sleep 1935 – 1935 is still text 1935 – 1935 is still text XML text is called PCDATA XML text is called PCDATA (for parsed character data) (for parsed character data) It uses a 16-bit encoding, e.g., \&\#x0152 for the Hebrew letter Mem It uses a 16-bit encoding, e.g., \&\#x0152 for the Hebrew letter Mem

14 XML Structure Nesting tags can be used to express various structures, e.g., a tuple (record): Nesting tags can be used to express various structures, e.g., a tuple (record): Lisa Simpson

15 XML Structure (cont’d) We can represent a list by using the same tag repeatedly: We can represent a list by using the same tag repeatedly: …

16 XML Structure (cont’d) Donald Duck Miki Mouse

17 Terminology The segment of an XML document between an opening and a corresponding closing tag is called an element Bart Simpson 02 – – element element, a sub-element of not an element

18 An XML Document is a Tree person name tel Bart Simpson 02 – – Leaves are either empty or contain PCDATA

19 Mixed Content An element may contain a mixture of sub- elements and PCDATA British Airways British Airways World’s favorite World’s favorite airline

20 The Header Tag Standalone=“no” means that there is an external DTD Standalone=“no” means that there is an external DTD You can leave out the encoding attribute and the processor will use the UTF-8 default You can leave out the encoding attribute and the processor will use the UTF-8 default

21 Processing Instructions Hello, world! Hello, world! <?pi-without-data?>

22 Using CDATA Entering a Kennel Club Member Entering a Kennel Club Member Enter the member by the name on his or her papers. Use the NAME tag. The NAME tag has two attributes. Common (all in lowercase, please!) is the dog's call name. Breed (also in all lowercase) is the dog's breed. Please see the breed reference guide for acceptable breeds. Your entry should look something like this: Enter the member by the name on his or her papers. Use the NAME tag. The NAME tag has two attributes. Common (all in lowercase, please!) is the dog's call name. Breed (also in all lowercase) is the dog's breed. Please see the breed reference guide for acceptable breeds. Your entry should look something like this: Sir Fredrick of Ledyard's End ]]> Sir Fredrick of Ledyard's End ]]> We want to see the text as is, even though it includes tags

23 A Complete XML Document ng/fa05/AdvDb/Lectures/bib.xml ng/fa05/AdvDb/Lectures/bib.xml

24 Well-Formed XML Documents An XML document (with or without a DTD) is well-formed if An XML document (with or without a DTD) is well-formed if Tags are syntactically correct Tags are syntactically correct Every tag has an end tag Every tag has an end tag Tags are properly nested Tags are properly nested There is a root tag There is a root tag A start tag does not have two occurrences of the same attribute A start tag does not have two occurrences of the same attribute An XML document must be well formed

25 Representing relational databases A relational database for school: student:course: enroll:

26 XML representation <school> Joe 3.0 Joe 3.0 </student> Mary 4.0 Mary 4.0 </student> DB 3.0 DB 3.0 </course> Web 3.0 Web 3.0 </course>

27 XML representation <enroll> </enroll><enroll> </enroll><enroll> </enroll></school>