XML 1.Introduction to XML 2.Document Type Definition (DTD) 3.XML Parser 4.Example: CGI Gateway to XML Middleware.

Slides:



Advertisements
Similar presentations
1/7 ITApplications XML Module Session 8: Introduction to Programming with XML.
Advertisements

XML and Enterprise Computing. What is XML? Stands for “Extensible Markup Language” –similar to SGML and HTML –document “tags” are used to define content.
XSL eXtensible Stylesheet Language. What is XSL? XSL is a language that allows one to describe a browser how to process an XML file. XSL can convert an.
XML & Data Structures for the Internet Yingcai Xiao.
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.
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
XML A brief introduction ---by Yongzhu Li. XML --- a brief introduction 2 CSI668 Topics in System Architecture SUNY Albany Computer Science Department.
Tutorial 9 Working with XHTML. XP Objectives Describe the history and theory of XHTML Understand the rules for creating valid XHTML documents Apply a.
CS 898N – Advanced World Wide Web Technologies Lecture 22: Applying XML Chin-Chih Chang
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
WWW and Internet The Internet Creation of the Web Languages for document description Active web pages.
COS 381 Day 16. Agenda Assignment 4 posted Due April 1 There was no resubmits of Assignment Capstone Progress report Due March 24 Today we will discuss.
September 15, 2003Houssam Haitof1 XSL Transformation Houssam Haitof.
Introducing XHTML: Module B: HTML to XHTML. Goals Understand how XHTML evolved as a language for Web delivery Understand the importance of DTDs Understand.
MC 365 – Software Engineering Presented by: John Ristuccia Shawn Posts Ndi Sampson XSLT Introduction BCi.
XML Anisha K J Jerrin Thomas. Outline  Introduction  Structure of an XML Page  Well-formed & Valid XML Documents  DTD – Elements, Attributes, Entities.
Introduction to XML cs3505. References –I got most of this presentation from this site –O’reilly tutorials.
Copyright © 2012 Accenture All Rights Reserved.Copyright © 2012 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are.
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.
Extensible Markup and Beyond
XML What is XML? XML v.s. HTML XML Components Well-formed and Valid Document Type Definition (DTD) Extensible Style Language (XSL) SAX and DOM.
XML 1 Enterprise Applications CE00465-M XML. 2 Enterprise Applications CE00465-M XML Overview Extensible Mark-up Language (XML) is a meta-language that.
Advanced Java Session 9 New York University School of Continuing and Professional Studies.
Introduction to XML Extensible Markup Language. What is XML XML stands for eXtensible Markup Language. A markup language is used to provide information.
Web Server Administration Web Services XML SOAP. Overview What are web services and what do they do? What is XML? What is SOAP? How are they all connected?
XML Parsers Overview  Types of parsers  Using XML parsers  SAX  DOM  DOM versus SAX  Products  Conclusion.
Tutorial 1: XML Creating an XML Document. 2 Introducing XML XML stands for Extensible Markup Language. A markup language specifies the structure and content.
Electronic Commerce COMP3210 Session 4: Designing, Building and Evaluating e-Commerce Initiatives – Part II Dr. Paul Walcott Department of Computer Science,
HTML Concepts and Techniques Fourth Edition Project 12 Creating and Using XML Documents.
Intro to XML Originally Presented by Clifford Lemoine Modified by Box.
XML A web enabled data description language 4/22/2001 By Mark Lawson & Edward Ryan L’Herault.
XML – An Introduction Structured Data Mark-up James McCartney CSCE 590, Cluster and Grid Computing.
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.
CIS 451: XML DTDs Dr. Ralph D. Westfall February, 2009.
WEB BASED DATA TRANSFORMATION USING XML, JAVA Group members: Darius Balarashti & Matt Smith.
1 Introduction  Extensible Markup Language (XML) –Uses tags to describe the structure of a document –Simplifies the process of sharing information –Extensible.
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.
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 Tutorial 11 Creating an XML Document Developing a Document for a Cooking Web Site.
Jennifer Widom XML Data Introduction, Well-formed XML.
COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 4 1COMP9321, 15s2, Week.
What is XML? eXtensible Markup Language eXtensible Markup Language A subset of SGML (Standard Generalized Markup Language) A subset of SGML (Standard Generalized.
©Silberschatz, Korth and Sudarshan10.1Database System Concepts W3C - The World Wide Web Consortium W3C - The World Wide Web Consortium.
XP Tutorial 9New Perspectives on HTML and XHTML, Comprehensive 1 Working with XHTML Creating a Well-Formed Valid Document Tutorial 9.
Martin Kruliš by Martin Kruliš (v1.1)1.
Tutorial 9 Working with XHTML. New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition 2 Objectives Describe the history and theory of XHTML.
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:
Tutorial 9 Working with XHTML. XP Objectives Describe the history and theory of XHTML Understand the rules for creating valid XHTML documents Apply a.
XML Extensible Markup Language
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.
XML Parsers Overview Types of parsers Using XML parsers SAX DOM
Unit 4 Representing Web Data: XML
Extensible Markup Language XML
Java XML IS
XML QUESTIONS AND ANSWERS
XML in Web Technologies
Extensible Markup Language XML
Chapter 7 Representing Web Data: XML
Web Server Administration
XML Parsers Overview Types of parsers Using XML parsers SAX DOM
XML Data Introduction, Well-formed XML.
More Sample XML By Sadia Anjum.
Presentation transcript:

XML 1.Introduction to XML 2.Document Type Definition (DTD) 3.XML Parser 4.Example: CGI Gateway to XML Middleware

1. Introduction to XML CGI Middleware can perform sophisticated processes on several data sources that itself becomes a data source. XML provides an industry standard way of describing data from different data sources. CGI programs that speak XML will be able to deliver to and retrieve data from any XML- compliant Perl script or Java applet.

Introduction to XML HTML was deigned for the data presentation language (display the content for human to read), it lacks of the data description capability (can’t interpret the data for machine to understand.) –Example: White XML was designed to make up many of HTML’s limitations. It is a data description language that is useful as a mechanism for transporting data from program to program on different platforms. –Example: White

XML Features 1.New tags and tag hierarchies can be defined to represent data specific to your application. For instance, a quiz can contain and tags. 2.Document type definitions can be defined for data validation. You can require, for instance, that every be associated with exactly one. 3.Data transport is Unicode-compliant, which is important for non-ASCII character sets. 4.Data is provided in a way that makes it easily transportable via HTTP. 5.Syntax is simple, allowing parsers to be simple.

Example All of the following players won the regular season MVP and playoff MVP in the same year, except for: B West was awesome, but they did not have a playoff MVP in his day. How could you choose Bird, Magic, Michael, or Hakeem?

Example (Cont.) Who is the only NBA player to get a triple- double by halftime? Larry Bird You got it! He was quite awesome! Sorry. Magic was just as awesome as Larry, but he never got a triple-double by halftime. I guess you are not a Celtics Fan.

XML Document All XML documents must present the data with at least one root structure surrounding the whole document. XML accept all HTML tags, but it requires closed tag for all the tags. XML parser converts the XML document into standard HTML. It uses the a dtd file to define how the XML document is structured and what the tags mean in relation to another –Example: quiz.dtd (next page) XSL (Extensible Style sheet Language) defines the standard stylesheet language for XML. It takes the original document tree and creates a new one based on the instructions that the developer provide.

2. Document Type Definition: quiz.dtd –<!ATTLIST QUESTION – TYPE CDATA #REQUIRED> –<!ATTLIST CHOICE – VALUE CDATA #REQUIRED – TEXT CDATA #REQUIRED> –<!ATTLIST RESPONSE – VALUE CDATA – STATUS CDATA>

DTD The DTD file is optional. XML document with the DTD file is called valid XML document. (without DTD is called well-formed document) The tags describe the actual tags that are valid in the XML document. The parentheses after the name of the element show what tags it can contain. The * symbol is a quantity identifier. It follows the same basic rules as regular expression matching. After each element is defined, its attributes need to be laid out. –Example: Questions have a type attribute that takes a string of character data. Furthermore, the #REQUIRED keyword indicates that this data is required in the XML document.

3. XML Parser XML parsers parse data in two different ways. –To have the XML parser take the entire document and simply return a tree of objects that represents the XML document hierarchy. Perl supports this concept via the XML::Grove module. (Similar with Java DOM (Document Object Model) API) –To parse XML documents is using a SAX (Simple API for XML) style of parser. This type of parser is event- based and is the one that XML::Parser is based on. CGI Perl XML::Parser is an interface to a library written in C called expat. (Similar with Java SAX API)

4. Example: CGI Gateway to XML Middleware CGI gateway script parsing the XML from the Netscape “What’s Related” XML middleware server.

Example: CGI Gateway to XML Middleware User provides a URL: whats_related.htmlwhats_related.html whats_related.cgi:whats_related.cgi –get(“ &url) returns the directly related URL in a XML data document (without DTD).XML data document –XML::Parser parse XML data document into a HTML document. –sub get_whats_related_to_whats_related will iterate through the directly related urls to get next level related urls.