XML: Extensible Markup Language Abeiku Duncan Leslie Salami Anthony Mensah-Kumah Michelle Amarteifio Joseph Owusu-Badu.

Slides:



Advertisements
Similar presentations
XML: Extensible Markup Language
Advertisements

XML: Extensible Markup Language. Slide Chapter Outline Introduction Structured, Semi structured, and Unstructured Data. XML Hierarchical (Tree)
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide
1 COS 425: Database and Information Management Systems XML and information exchange.
4/17/2017.
XML(EXtensible Markup Language). XML XML stands for EXtensible Markup Language. XML is a markup language much like HTML. XML was designed to describe.
XML –Query Languages, Extracting from Relational Databases ADVANCED DATABASES Khawaja Mohiuddin Assistant Professor Department of Computer Sciences Bahria.
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.
Manohar – Why XML is Required Problem: We want to save the data and retrieve it further or to transfer over the network. This.
4/20/2017.
XML – Data Model, DTD and Schema
 Introduction to XML Introduction to XML  Features of XML Features of XML  Syntax of XML Syntax of XML  Syntax rules of XML document Syntax rules.
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.
Maziar Sanaii Ashtiani – SCT – EMU, Fall 2011/12.
1Computer Sciences Department Princess Nourah bint Abdulrahman University.
TDDD43 XML and RDF Slides based on slides by Lena Strömbäck and Fang Wei-Kleiner 1.
XML and its applications: 4. Processing XML using PHP.
School of Computing and Management Sciences © Sheffield Hallam University To understand the Oracle XML notes you need to have an understanding of all these.
XML eXtensible Markup Language w3c standard Why? Store and transport data Easy data exchange Create more languages WSDL (Web Service Description Language)
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.
Chapter 26 XML and Internet Databases Copyright © 2004 Pearson Education, Inc.
These Questions are copied from
 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,
Softsmith Infotech XML. Softsmith Infotech XML EXtensible Markup Language XML is a markup language much like HTML Designed to carry data, not to display.
XML 2nd EDITION Tutorial 1 Creating An Xml Document.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 27 XML: Extensible Markup Language.
XP 1 Creating an XML Document Developing an XML Document for the Jazz Warehouse XML Tutorial.
Copyright © 2004 Ramez Elmasri and Shamkant Navathe Elmasri/Navathe, Fundamentals of Database Systems, Fourth Edition Chapter 26-2 Introduction Although.
Web Technologies COMP6115 Session 4: Adding a Database to a Web Site Dr. Paul Walcott Department of Computer Science, Mathematics and Physics University.
An Introduction to XML Sandeep Bhattaram
XML Introduction. What is XML? XML stands for eXtensible Markup Language XML stands for eXtensible Markup Language XML is a markup language much like.
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 and databases Chap. 12. Databases Today Data today: Structured - Info in databases – Data organized into chunks, similar entities groups together.
XML and Database.
CS 157B: Database Management Systems II February 11 Class Meeting Department of Computer Science San Jose State University Spring 2013 Instructor: Ron.
COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 4 1COMP9321, 15s2, Week.
Submitted To: Ms. Poonam Saini, Asst. Prof., NITTTR Submitted By: Rohit Handa ME (Modular) CSE 2011 Batch.
Web Technologies Lecture 4 XML and XHTML. XML Extensible Markup Language Set of rules for encoding a document in a format readable – By humans, and –
CIS 375—Web App Dev II DTD. 2 Introduction to DTD DTD stands for ______________________. The purpose of a DTD is to define the legal building blocks of.
Computing & Information Sciences Kansas State University Friday, 20 Oct 2006CIS 560: Database System Concepts Lecture 24 of 42 Friday, 20 October 2006.
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.
C Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Introduction to XML Standards.
 XML derives its strength from a variety of supporting technologies.  Structure and data types: When using XML to exchange data among clients, partners,
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved Chapter 7 Representing Web Data:
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.
XSLT, XML Schema, and XPath Matt McClelland. Introduction XML Schema ▫Defines the content and structure of XML data. XSLT ▫Used to transform XML documents.
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 Databases Presented By: Pardeep MT15042 Anurag Goel MT15006.
Enterprise Database Systems XML eXtended Markup Language Dr. Georgia Garani Dr. Theodoros Mitakos Technological.
1 Introduction to XML Babak Esfandiari. 2 What is XML? introduced by W3C in 98 Stands for eXtensible Markup Language it is more general than HTML, but.
Extensible Markup Language (XML) Pat Morin COMP 2405.
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.
Enterprise Database Systems XML eXtended Markup Language
CSE202 Database Management Systems
XML: Extensible Markup Language
Unit 4 Representing Web Data: XML
XML QUESTIONS AND ANSWERS
XML: Extensible Markup Language
XML in Web Technologies
Database Processing with XML
Prepared for Md. Zakir Hossain Lecturer, CSE, DUET Prepared by Miton Chandra Datta
Chapter 7 Representing Web Data: XML
2/18/2019.
CSE591: Data Mining by H. Liu
Presentation transcript:

XML: Extensible Markup Language Abeiku Duncan Leslie Salami Anthony Mensah-Kumah Michelle Amarteifio Joseph Owusu-Badu

Introduction XML has emerged as standard for structuring and exchanging data over the Web. XML emerged as a way to overcome the shortcomings of its two predecessors, SGML and HTML It’s a markup language that allows users to create customized tags Formatting for display aspects can be specified separately, for example through XSL

ADVANTAGES It is as easy as HTML. It is platform independent. Its very portable and can be used on handheld devices like PDA’s It can be deployed on any network if it is amicable for usage with the application in use While data is being exchanged using XML, there will be no loss of data even between systems that use totally different formats

XML is an extendable language, meaning that you can create your own tags, or use the tags which have already been created XML can also be stored in databases in XML format and human readable format.

DISADVANTAGES Lack of adequate processing applications.

-Generally begins with an XML declaration eg. -Syntactically follows guidelines of tree structure -Elements must have a pair of start and end tags and -The characters between the start and end tags are the elements content - API’s called DOM (Document Object Model) enable manipulation of resulting tree representation of XML document -SAX enables streamed processing of XML documents -Tags for XML can have any name Well-Formed XML Document

Valid XML Document The element names used in the start and end tag pairs must follow the structure specified in a separate XML DTD XML DTD (Document Type Definition) A DTD is an example of a schema or grammar.schema DTD typically indicates the constrain set of elements that may be used in a document, which attributes may be applied to them, the order in which they may appear, and the allowable parent/child relationships. A name is given to the root tag of the element, then the elements and their nested structure are specified.

Notations used in specifying elements in DTD (*) - means the element can be repeated zero or more times eg. (+) - means the element can be repeated one or more times eg. (?) – means an element can be repeated zero or one times eg. - An element without any of the preceding three symbols must appear exactly once in the document The element type is specified via parentheses following the element. If the name in the parenthesis is an element name, then it is a child of the outer element. If it is a data type then it is a leaf node. eg. where PCDATA means parsed character data which is similar to a string

XML Schema Language It is the standard for specifying the structure of XML documents It borrows concepts from database and object models such as keys, references and identifiers.

XML Schema concepts Schema descriptions and XML namespaces eg. Annotations, Documentation, and language used eg. Elements and types eg. Specifying element type and minimum and maximum occurrences eg. Specifying keys eg. Specifying the structures of complex elements via complex types eg.

XML Documents and Databases Approaches to storing xml documents  Using a dbms to store documents as text  Using a dbms to store document contents as data elements  Designing a specialized system for storing native xml data…….(tamino by software AG, dynamic application platform of eXceleron)  Customized xml documents from preexisting relational databases

Extracting XML Documents from Relational Databases Flat relational data model(graph model) Hierarchical model

course department instructor section student name ssn name class name number ssn name rank salary Qtr year number

Breaking cycles to convert graphs into trees student section instructor course department instructor course

Other steps for extracting xml documents from databases Create correct query in sql Structured from flat relational form to xml tree structure Query customized to select single objects

Standards for XML Querying XPath XQuery

XPath Returns a collection of element nodes that satisfy certain patterns specified in the expression. The name is generated from its use of a path notation for navigation through the tree-like structure of an XML document. Two main separators are used to specify a path 1.Single slash (/) 2.Double slash (//)

XPath Examples /school /school/library //employee[employeeSalary gt 60000]/employeeName //book/title | //book/price

XQuery Permits the specification of more general queries on one or more XML documents. Typical XQuery form is called FLWR expression and it stands for four main clauses; FOR LET WHERE RETURN

XQuery Examples FOR $x IN doc( //employee [employeeSalary gt 40000]/employeeName RETURN $x/firstName, $x/lastName

XQuery Example (contd.) FOR $x IN doc( yeewww.school.com/info.xml)/school/emplo yee WHERE $x/employeeSalary gt 40000) RETURN $x/employeeName/firstName,$x/employeeNa me/lastName

Reading XML PHP JAVA C #

PHP Tove Jani Reminder Don't forget me this weekend!

PHP Code getName(). " "; foreach($xml->children() as $child) { echo $child->getName(). ": ". $child. " "; } ?>

Output note to: Tove from: Jani heading: Reminder body: Don't forget me this weekend!

C # using System; using System.Xml; namespace ReadXMLfromFile { class Class1 { static void Main(string[] args) { XmlTextReader reader = new XmlTextReader ("books.xml"); while (reader.Read()) { switch (reader.NodeType) { case XmlNodeType.Element: // The node is an element. Console.Write("<" + reader.Name); Console.WriteLine(">"); break; case XmlNodeType.Text: //Display the text in each element. Console.WriteLine (reader.Value); break; case XmlNodeType.EndElement: //Display the end of the element. Console.Write("</" + reader.Name); Console.WriteLine(">"); break; } Console.ReadLine(); }

Output The Autobiography of Benjamin Franklin Benjamin Franklin