VICTORIA UNIVERSITY OF WELLINGTON Te Whare Wananga o te Upoko o te Ika a Maui SWEN 432 Advanced Database Design and Implementation An Introduction to XML.

Slides:



Advertisements
Similar presentations
Chapter 7 An Introduction to XML.
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.
SPECIAL TOPIC XML. Introducing XML XML (eXtensible Markup Language) ◦A language used to create structured documents XML vs HTML ◦XML is designed to transport.
An Introduction to XML Based on the W3C XML Recommendations.
© De Montfort University, XML – a meta language Howell Istance and Peter Norris School of Computing De Montfort University.
3 November 2008CIS 340 # 1 Topics To define XML as a technology To place XML in the context of system architectures.
CS 898N – Advanced World Wide Web Technologies Lecture 21: XML Chin-Chih Chang
Sistemi basati su conoscenza XML Prof. M.T. PAZIENZA a.a
Tutorial 11 Creating XML Document
Introduction to XML: Yong Choi CSU Bakersfield.
Introducing XHTML: Module B: HTML to XHTML. Goals Understand how XHTML evolved as a language for Web delivery Understand the importance of DTDs Understand.
XML Basics Hope Greenberg Center for Teaching & Learning.
ECA 228 Internet/Intranet Design I Intro to XML. ECA 228 Internet/Intranet Design I HTML markup language very loose standards browsers adjust for non-standard.
XML introduction to Ahmed I. Deeb Dr. Anwar Mousa  presenter  instructor University Of Palestine-2009.
VICTORIA UNIVERSITY OF WELLINGTON Te Whare Wananga o te Upoko o te Ika a Maui SWEN 432 Advanced Database Design and Implementation Document Type Definition.
Introduction to XML cs3505. References –I got most of this presentation from this site –O’reilly tutorials.
VICTORIA UNIVERSITY OF WELLINGTON Te Whare Wananga o te Upoko o te Ika a Maui SWEN 432 Advanced Database Design and Implementation XML Schema 1 Lecturer.
XML CPSC 315 – Programming Studio Fall 2008 Project 3, Lecture 1.
School of Computing and Management Sciences © Sheffield Hallam University To understand the Oracle XML notes you need to have an understanding of all these.
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.
XML Technologies Surekha Akula
VICTORIA UNIVERSITY OF WELLINGTON Te Whare Wananga o te Upoko o te Ika a Maui SWEN 432 Advanced Database Design and Implementation XML Storage Techniques.
E0262 – MIS – Multimedia Storage Techniques XML (Extensible Markup Language)  XML is a markup language for creating documents containing structured information.
Introduction to XML. What is XML? Extensible Markup Language XML Easier-to-use subset of SGML (Standard Generalized Markup Language) XML is a.
XML 1 Enterprise Applications CE00465-M XML. 2 Enterprise Applications CE00465-M XML Overview Extensible Mark-up Language (XML) is a meta-language that.
VICTORIA UNIVERSITY OF WELLINGTON Te Whare Wananga o te Upoko o te Ika a Maui SWEN 432 Advanced Database Design and Implementation eXist Update Lecturer.
 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,
Tutorial 1: XML Creating an XML Document. 2 Introducing XML XML stands for Extensible Markup Language. A markup language specifies the structure and content.
1 Chapter 10: XML What is XML What is XML Basic Components of XML Basic Components of XML XPath XPath XQuery XQuery.
XML eXtensible Markup Language. Topics  What is XML  An XML example  Why is XML important  XML introduction  XML applications  XML support CSEB.
Softsmith Infotech XML. Softsmith Infotech XML EXtensible Markup Language XML is a markup language much like HTML Designed to carry data, not to display.
E0262 – MIS – Multimedia Storage Techniques XML (Extensible Markup Language  XML is a markup language for creating documents containing structured information.
XML 2nd EDITION Tutorial 1 Creating An Xml Document.
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 Instructor: Charles Moen CSCI/CINF XML  Extensible Markup Language  A set of rules that allow you to create your own markup language  Designed.
XP 1 Creating an XML Document Developing an XML Document for the Jazz Warehouse XML Tutorial.
Appendix C: Brief Overview of XML. ©SoftMoore ConsultingSlide 2 What is XML? The eXtensible Markup Language (XML) is a meta-markup language; i.e., a language.
Lecture 16 Introduction to XML Boriana Koleva Room: C54
Web Technologies COMP6115 Session 4: Adding a Database to a Web Site Dr. Paul Walcott Department of Computer Science, Mathematics and Physics University.
1 Introduction to XML XML stands for Extensible Markup Language. Because it is extensible, XML has been used to create a wide variety of different markup.
An Introduction to XML Sandeep Bhattaram
XML Design Goals 1.XML must be easily usable over the Internet 2.XML must support a wide variety of applications 3.XML must be compatible with SGML 4.It.
XML Introduction. Markup Language A markup language must specify What markup is allowed What markup is required How markup is to be distinguished from.
XML Basics A brief introduction to XML in general 1XML Basics.
1 Tutorial 11 Creating an XML Document Developing a Document for a Cooking Web Site.
1 herbert van de sompel CS 502 Computing Methods for Digital Libraries Cornell University – Computer Science Herbert Van de Sompel
COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 4 1COMP9321, 15s2, Week.
ENG 5933 Humanities Computing Introduction to XML
225 City Avenue, Suite 106 Bala Cynwyd, PA , phone , fax presents… XML Syntax v2.0.
Well Formed XML The basics. A Simple XML Document Smith Alice.
Introduction to DTD A Document Type Definition (DTD) defines the legal building blocks of an XML document. It defines the document structure with a list.
XML CSC1310 Fall HTML (TIM BERNERS-LEE) HyperText Markup Language  HTML (HyperText Markup Language): December  Markup  Markup is a symbol.
Web Technology (NCS-504) Prepared By Mr. Abhishek Kesharwani Assistant Professor,UCER Naini,Allahabad.
C Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Introduction to XML Standards.
Introduction to XML Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved Chapter 7 Representing Web Data:
XP 1Creating Web Pages with XML Tutorial 1 New Perspectives on XML Tutorial 1 – Creating an XML Document.
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 intro. 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.
XML BASICS and more…. What is XML? In common:  XML is a standard, simple, self-describing way of encoding both text and data so that content can be processed.
Unit 4 Representing Web Data: XML
XML QUESTIONS AND ANSWERS
The XML Language.
Chapter 7 Representing Web Data: XML
Creating an XML Document
XML Data Introduction, Well-formed XML.
Allyson Falkner Spokane County ISD
Presentation transcript:

VICTORIA UNIVERSITY OF WELLINGTON Te Whare Wananga o te Upoko o te Ika a Maui SWEN 432 Advanced Database Design and Implementation An Introduction to XML Lecturer : Dr. Pavle Mogin

SWEN 432 Advanced Database Design and Implementation 2015 Intro to XML 1 Plan for The Introduction into XML Answering the question “Why XML” XML concepts: –Processing instructions and the XML declaration –Elements, –Attributes, –Empty tags, –Comments, –Entity references, and –CDATA section –Well Formed Documents –Reading: W3C Recommendations at Ramakrishnan, Gherke: Database Management Systems, Chapter 7 and Chapter 27 Any book on XML

SWEN 432 Advanced Database Design and Implementation 2015 Intro to XML 2 The Main Motive The main motive for introducing XML was to enable a seamless flow of data between parties communicating over Internet –HTML proved to be inadequate, since its tags embed document presentation information, only, –XML tags imbed both structuring rules and meaning of data A valid sample of XML code: NZD 99.95

SWEN 432 Advanced Database Design and Implementation 2015 Intro to XML 3 Origin of XML XML has been completed in early 1998 by W3C –The same organization that is setting the overall directions for the Web XML defines an open and flexible standard for: –Defining new languages, –Publishing, and –Exchanging any kind of information Soon, after it introduction, people realized that they need not only to exchange data, but also to: –Store, –Query, –Update, –Protect … Hence, database behaviour

SWEN 432 Advanced Database Design and Implementation 2015 Intro to XML 4 XML Meta Languages New XML languages are defined using XML meta languages XML meta languages consist of official words, rules and conventions (grammar) that allow: –Creation of an own corporate or industry standard markup language, –Including data structuring and semantic rules into the new language, –Easy understanding by communicating parties XML meta languages are used to design XML schemes

SWEN 432 Advanced Database Design and Implementation 2015 Intro to XML 5 Related Technologies Style languages (to define appearence): –Cascading Style Sheets (CSS), –Extensible Style Language (XSL) Supplemental Technologies: –XLinks, –XPointers, –Namespaces, and –Resource Description Framework

SWEN 432 Advanced Database Design and Implementation 2015 Intro to XML 6 XML Declaration XML documents may be recognized by the XML declaration This is a processing instruction placed at the start of an XML file (= document) that identifies the version in use An XML document may have more than one processing instruction, Here are two processing instructions:

SWEN 432 Advanced Database Design and Implementation 2015 Intro to XML 7 XML Elements Elements are XML basic building blocks Each element has a start and an end tag Content A tag contains an element’s name and carries semantics of the element content An element name must be a valid XML name: –Should start with a letter or an underscore, –Subsequent characters may include letters, digits, underscores, hyphens, and periods –May not include whitespace

SWEN 432 Advanced Database Design and Implementation 2015 Intro to XML 8 Content of an Element and the Root The content of an element may be some text or other elements James Bond Each XML document has exactly one root element A root element contains all other elements of a document as its content Elements that appear inside another element can have more than one instance inside the same document

SWEN 432 Advanced Database Design and Implementation 2015 Intro to XML 9 Some Basic Structuring Rules Elements can be nested inside elements Content Elements must be properly nested –The start tag that appears inside the content of another tag must have an end tag inside the same parent element –That way hierarchical structures are built Text may be interspersed with elements text Unlike HTML, XML tags are case sensitive

SWEN 432 Advanced Database Design and Implementation 2015 Intro to XML 10 An XML Fragment Ahmed Craig

SWEN 432 Advanced Database Design and Implementation 2015 Intro to XML 11 Attributes An attribute is a (name, value) pair Both name and value are strings that are separated by “=” Attributes are set inside: –A processing instruction –The start tag of an element All attribute values must be enclosed in quotation marks Attribute names must be valid XML names No element or processing instruction may have two attributes with the same name

SWEN 432 Advanced Database Design and Implementation 2015 Intro to XML 12 An XML Fragment with Attributes Ahmed Craig

SWEN 432 Advanced Database Design and Implementation 2015 Intro to XML 13 The same XML Data with Elements SWEN Ahmed …

SWEN 432 Advanced Database Design and Implementation 2015 Intro to XML 14 Empty Tags If an element is not going to have any content (except possibly attributes) it does not need to have a start and an end tag, but an empty tag only Empty tags may contain attributes and usually do

SWEN 432 Advanced Database Design and Implementation 2015 Intro to XML 15 Comments Similar to HTML, XML comments start with “ ” Comments may be inserted anywhere in an XML document, but not: –Before the document declaration, or –Inside a tag Everyone likes this comment: But, all data between comment tags are ignored by browsers

SWEN 432 Advanced Database Design and Implementation 2015 Intro to XML 16 Entity References Entity references are markup that is replaced with character data when the document is parsed A browser parses an XML document before it renders it Wherever an entity reference appears in an XML document, it is textually replaced by its content Entity references start with a ‘&’ and end with a ‘ ; ’ There are five predefined entities: –< is represented by & lt; –& is represented by & amp; –> is represented by & gt; –“ is represented by & quot ; and –‘ is represented by & apos;

SWEN 432 Advanced Database Design and Implementation 2015 Intro to XML 17 CDATA Section CDATA sections are used when you want all text to be interpreted as pure character rather than as markup This is particularly useful for text that contains a lot of, &, or “ characters but no markup A good example is a Java program CDATA section begins with <![CDATA[ and ends with ]]> All between “ [ “ and “ ]] ” is treated as a pure text

SWEN 432 Advanced Database Design and Implementation 2015 Intro to XML 18 Well Formed XML Documents XML browsers will render an XML document only if it is well formed A standalone XML document is well formed if: 1.It starts with an XML declaration, 2.It contains a root element that embeds all other elements, 3.All elements are properly nested, 4.Elements that contain other elements or text have both start and end tag, 5.Elements that do not contain other elements and text use only a single tag that ends with “/>”, 6.Attribute values are quoted, 7.The characters “<” and “&” are only used to start tags and entity references, respectively, 8.The only entity references which appear are &, <, >, &apos;, and " 9.Element and attribute names must be valid XML names

SWEN 432 Advanced Database Design and Implementation 2015 Intro to XML 19 Summary XML is an open and free standard that promotes exchange of documents via Internet An XML document: –Has a meaning that people understand easily, –May be easily processed by computers, –Is a tree structure over a set of: Elements, Attributes, Character data, Comments, and CDATA sections –Has a declaration at the beginning –Should be well formed