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.

Slides:



Advertisements
Similar presentations
CSCI N241: Fundamentals of Web Design Copyright ©2004 Department of Computer & Information Science Introducing XHTML: Module B: HTML to XHTML.
Advertisements

Introduction to HTML & CSS
SPECIAL TOPIC XML. Introducing XML XML (eXtensible Markup Language) ◦A language used to create structured documents XML vs HTML ◦XML is designed to transport.
1 DTD (Document Type Definition) Imposing Structure on XML Documents (W3Schools on DTDs)W3Schools on DTDs.
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,
3 November 2008CIS 340 # 1 Topics To define XML as a technology To place XML in the context of system architectures.
XML eXtensible Markup Language. HTML is not extensible One defect of HTML is that it is not extensible In HTML we cannot, for example, define notions.
CS 898N – Advanced World Wide Web Technologies Lecture 21: XML Chin-Chih Chang
CIS101 Introduction to Computing Week 05. Agenda Your questions Exam next week - Excel Introduction to the Internet & HTML Online HTML Resources Using.
IS 373—Web Standards Todd Will
Thayer School of Engineering Dartmouth Lecture 2 Overview Web Services concept XML introduction Visual Studio.net.
Samad Paydar Web Technology Laboratory Computer Engineering Department Ferdowsi University of Mashhad 1389/11/20 An Introduction to the Semantic Web.
Introduction to XML: Yong Choi CSU Bakersfield.
Upgrading to XHTML DECO 3001 Tutorial 1 – Part 1 Presented by Ji Soo Yoon 19 February 2004 Slides adopted from
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.
CIS101 Introduction to Computing Week 06. Agenda Your questions Excel Exam during second hour Our status after the snow day Introduction to the Internet.
 Definition of HTML Definition of HTML  Tags in HTML Tags in HTML  Creation of HTML document Creation of HTML document  Structure of HTML Structure.
4/20/2017.
Pemrograman Berbasis WEB XML part 2 -Aurelio Rahmadian- Sumber: w3cschools.com.
XML introduction to Ahmed I. Deeb Dr. Anwar Mousa  presenter  instructor University Of Palestine-2009.
_ HTML, XHTML & CSS Sami Niemelä | Module 1: Introduction to digital media: Day 02.
XML Anisha K J Jerrin Thomas. Outline  Introduction  Structure of an XML Page  Well-formed & Valid XML Documents  DTD – Elements, Attributes, Entities.
1Computer Sciences Department Princess Nourah bint Abdulrahman University.
An XML Introduction Extensible Markup Language Describe Structure and Content of Data Sample XML Document.
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.
CS 299 – Web Programming and Design Introduction to HTML.
1 © Netskills Quality Internet Training, University of Newcastle Introducing XML © Netskills, Quality Internet Training University.
FIGIS’ML Hands-on training - © FAO/FIGIS An introduction to XML Objectives : –what is XML? –XML and HTML –XML documents structure well-formedness.
XML About XML Things to be known Related Technologies XML DOC Structure Exploring XML.
Tutorial 1: XML Creating an XML Document. 2 Introducing XML XML stands for Extensible Markup Language. A markup language specifies the structure and content.
HTML Internet Basics & Beyond. What The Heck Is HTML? HTML is the language of web pages. In order to truly understand HTML, you need to know a little.
XML A web enabled data description language 4/22/2001 By Mark Lawson & Edward Ryan L’Herault.
XML eXtensible Markup Language. Topics  What is XML  An XML example  Why is XML important  XML introduction  XML applications  XML support CSEB.
XML 2nd EDITION Tutorial 1 Creating An Xml Document.
XP 2 HTML Tutorial 1: Developing a Basic Web Page.
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.
WEB APPLICATION DEVELOPMENT For More visit:
XP 1 Creating an XML Document Developing an XML Document for the Jazz Warehouse XML Tutorial.
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.
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.
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,
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.
Jennifer Widom XML Data Introduction, Well-formed XML.
How the Web Works Building a Website – Lesson 1. How People Access the Web Browsers People access websites using software called a web browser. To view.
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.
+ 1 XML eXtensible Markup Language. + 2 XML Lecture Adapted from the work of Dr. Praveen Madiraju of Marquette University.
Copyright © 2003 Pearson Education, Inc. Slide 1-1 Created by Cheryl M. Hughes The Web Wizard’s Guide to XHTML by Cheryl M. Hughes.
XML CSC1310 Fall HTML (TIM BERNERS-LEE) HyperText Markup Language  HTML (HyperText Markup Language): December  Markup  Markup is a symbol.
HTML HYPER TEXT MARKUP LANGUAGE. INTRODUCTION Normal text” surrounded by bracketed tags that tell browsers how to display web pages Pages end with “.htm”
CSS THE MISSING MANUAL Introduction. Benefits of CSS Style sheets offer more formatting choices than are offered in straight HTML  EXAMPLE: When you.
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 – Basic Concepts (modified version from Dr. Praveen Madiraju) 2015, Fall Pusan National University Ki-Joune Li.
Connecting to External Data. Financial data can be obtained from a number of different data sources.
1 XML eXtensible Markup Language. 2 Introduction and Motivation Dr. Praveen Madiraju Modified from Dr.Sagiv’s slides.
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.
Extensible Markup Language (XML) Pat Morin COMP 2405.
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
Chapter 7 Representing Web Data: XML
Creating an XML Document
XML Data Introduction, Well-formed XML.
XML – Basic Concepts (modified version from Dr. Praveen Madiraju)
eXtensible Markup Language
Presentation transcript:

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 XML is needed –Basic technologies used together with XML In the next few weeks: challenges in using XML

XML in One Slide Basically, XML looks like HTML. However, in XML, you can use any tag names that you want Example: Lisa Simpson Is that all? Big Deal?!

Motivation (1): The Semantic Web

Example 1: A Homepage on the Web Tom Sawyer's Homepage Tom's Friends Tom's Hobbies: Boating on the Mississippi River Chewing Gum Painting the Fence

Web Pages are Written in HTML HTML is a markup language An HTML page consists of tags with attributes and data HTML describes the style of the page (e.g., color, font type, etc.)

Tom Sawyer's Homepage Hi'ya all. Did you know that my best friend is Huckleberry Finn ? Sometimes, I like Becky Thatcher ? Here are some of my hobbies: Boating on the Mississippi River Chewing gum Painting the fence If you want to discuss common interests, contact me at

Automatically Using Information Tom Sawyer has a homepage. So do a lot of other people. It would be nice to be able to do the following things automatically (via a computer program) –Querying the Page: Find Tom Sawyer's address and the names of his friends –Querying Similar Pages: Find people who have interests in common with Tom Sawyer

Automatically Using Information Site Personalization: Tom Sawyer's interests should be automatically recognized by sites –When Tom Sawyer enters Amazon, he should get "book recommendations" that match his interests –When Tom Sawyer enters a site that sells food, he should be told about sales on gum –This should all happen without Tom having to tell every site about his interests

Can we Automatically use the Information? In order to perform the tasks described before, we have to: –Find web pages that describe people –Extract the relevant information Problems: –How can we know if a page describes a person? –How can we know what to extract? (Everyone has their own style for their homepage...) –How can we "understand" the extracted information (What parts of the page describe which information?)

Example 2: Weather Forecasting National Weather Service: Weather Forecasting and Weather Alerts Flood Alerts in Mississippi

Wouldn't it be great if… Wouldn't it be great if Tom could get automatic updates of weather problems in Mississippi? It is dangerous to go boating if there are floods…

Example 3: News Alerts Yahoo News Traffic Jam in the Mississippi River

Wouldn't it be great if… Wouldn't it be great if Tom could get automatic updates of important news related to Mississippi? He might want to choose a different river to go boating…

Can these things be done? Once again, we need to FIND the relevant pages and EXTRACT the relevant data HTML pages are constantly changing How can we figure out what data is relevant and what the data is talking about automatically? (even when the page changes) HTML describes only style and not meaning (or semantics) It is difficult (perhaps impossible) to perform these tasks

Two Basic Approaches If the information on the Web was neatly organized in a huge database, these problems could be solved. But its not – What should we do? AI, NLP Approach: Use smart techniques to recognize information, e.g., recognize patterns about how things are written DB Approach: Turn the Web in to a “database”, by writing it in XML

The Semantic Web The Semantic Web is a machine-understandable Web The meaning of data (i.e., the semantics of data) should be encoded together with the data Tim Berners-Lee, the inventor of the Web (by putting together the ideas of hyper-text, TCP/IP, DNS) is one of the main people behind the Semantic Web

Main Technologies Needed XML: The syntax for marking up text with meaning RDF: Defines objects and relationships between them OWL: Defines ontologies which connect different concepts (e.g., a car is an automobile, a car is a type of locamotive) Web Services: Allow services given online to be accessed programmatically Here is a simplified version of how it could work

Thomas Sawyer Male English Huckleberry Finn Simplified version of the FOAF standard

Is there XML on the Web? (1) The weather forecasting site exports its forecasts as RSS (a standard for marking up news) - this data can easily be used by a program

Is there XML on the Web? (2) Yahoo News (seen before) exports its news as RSS - this data can easily be used by a program

The Sky’s The Limit: Doctor’s appointment “The Semantic Web”, Scientific American, May 2001 Mom Physician’s Agent Lucy’s Agent required treatment Schedule appointment Insurance Co. Provider sites Rating in-plan? close-by? Specialist? Pete’s Agent Driving schedule

Motivation (2): Data Exchange

Exchanging Data Problem: Many data sources, each of a different type (different vendor), with a different schema. –How can the data be combined and used together? –How can different companies collaborate on their data? –What (proprietary?) format should be used to exchange the data?

Usage Scenario: Company Collaboration Several companies want to collaborate Need to share data Each company has a different type of database system with a different schema Solution: Agree on a XML schema for exchange. Import to and export from this schema

Motivation (3): Separating Content From Style

Web Site Development Web sites develop over time Important to separate style from data in order to allow changes to the site structure and appearance CSS separates style from data only in a limited way – HTML will still have tables, lists, etc Using XML, we can store data alone Using XSL, this data can be translated into HTML The data can be translated differently as the site develops

Write Once Use Everywhere XML Stock Data XS L WML (hand-held devices) XS L HTML (web browser XS L TEXT (Excel)

XML Syntax

HTML Used for publishing hypertext on the World- Wide Web Designed to describe how a Web browser should arrange text, images and push- buttons on a page Easy to learn, but does not convey structure Fixed tag set

HTML Example Welcome to the DBI course Introduction Opening tag Closing tag Text (PCDATA) “Bachelor” tag Attribute name Attribute value

XML Vs. HTML XML and HTML are “brothers”. They are both special cases of SGML. HTML has specific tag and attribute names. These are associated with a specific meaning XML can have any tag and attribute name. These are not associated with any meaning HTML is used to specify visual style XML is used to specify meaning HTML XML SGML

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

XML Document is a Tree XML documents are abstractly modeled as trees, as reflected by their nesting Sometimes, XML documents are graphs (by using IDs and IDREFs) person name tel Bart Simpson 02 – –

Example XML Fragment Donald Duck Miki Mouse

Another Example An element may contain a mixture of sub- elements and PCDATA British Airways World’s favorite airline

A Complete XML Document Lisa Simpson Required Optional

Attributes An opening tag may contain attributes These are typically used to describe the contents of an element cheese fromage branza A food made …

When to Use Attributes It’s not always clear when to use attributes L. Simpson L. Simpson

When to Use Attributes It’s not always clear when to use attributes L. Simpson L. Simpson General Rule: Use an element if you need to nest data Use an attribute for “IDs”, i.e., identifying data More on this soon…

Rules for XML (1) XML is order sensitive, i.e. the following are different: XML is case-sensitive, i.e., the following are different:,, cheese fromage fromage cheese

Rules for XML (2) Tags come in pairs... They must be properly nested. Which of the following are good? – – There is a special shortcut for tags that have no text in between them (bachelor tags) –

Rules for XML (3) There should be exactly one top-level element. This element is also called the root element Which of the following is legal? Is this legal? Is this legal? You tell me.

Well Formed Documents A document is well-formed if it –obeys all the above rules, and in addition –does not repeat an attribute within a tag, i.e., the following is illegal: …

Tables Versus XML Can you easily represent the contents of a table in XML? –Example: Projects(title, budget, managedBy), Employees(name, age, ssn) Can you easily represent the contents of an XML document in a table? –Example: Remember the phone bookExample: Remember the phone book