What is XML? Extensible Markup Language (XML) is:

Similar documents
DRAFT. Standard Definition. Extensible Event Stream. Christian W. Günther Fluxicon Process Laboratories

XML WEB TECHNOLOGIES

04 XML Schemas. Software Technology 2. MSc in Communication Sciences Program in Technologies for Human Communication Davide Eynard

Last Week. XML (extensible Markup Language) HTML Deficiencies. XML Advantages. Syntax of XML DHTML. Applets. Modifying DOM Event bubbling

XML and Data Management

Presentation / Interface 1.3

XML: extensible Markup Language. Anabel Fraga

User manual for e-line DNB: the XML import file. User manual for e-line DNB: the XML import file

Web Content Management System based on XML Native Database

WWW. World Wide Web Aka The Internet. dr. C. P. J. Koymans. Informatics Institute Universiteit van Amsterdam. November 30, 2007

Introduction to XML Applications

Design and Implementation of a Feedback Systems Web Laboratory Prototype

Quiz! Database Indexes. Index. Quiz! Disc and main memory. Quiz! How costly is this operation (naive solution)?

Agents and Web Services

Introduction. Web Data Management and Distribution. Serge Abiteboul Ioana Manolescu Philippe Rigaux Marie-Christine Rousset Pierre Senellart

+ <xs:element name="productsubtype" type="xs:string" minoccurs="0"/>

1.264 Lecture 19 Web database: Forms and controls

Gplus Adapter 8.0. for Siebel CRM. Developer s Guide

<xs:restriction base="xs:string">

No Trade Secrets. Microsoft does not claim any trade secret rights in this documentation.

How To Use Xml In A Web Browser (For A Web User)

Lesson 4 Web Service Interface Definition (Part I)

XIII. Service Oriented Computing. Laurea Triennale in Informatica Corso di Ingegneria del Software I A.A. 2006/2007 Andrea Polini

DTD Tutorial. About the tutorial. Tutorial

XML Processing and Web Services. Chapter 17

Computer Science E-259

keyon Luna SA Monitor Service Administration Guide 1 P a g e Version Autor Date Comment

[MS-FSDAP]: Forms Services Design and Activation Web Service Protocol

Modernize your NonStop COBOL Applications with XML Thunder September 29, 2009 Mike Bonham, TIC Software John Russell, Canam Software

Internet Technologies_1. Doc. Ing. František Huňka, CSc.

Semistructured data and XML. Institutt for Informatikk INF Ahmet Soylu

XML. Document Type Definitions XML Schema

Fast track to HTML & CSS 101 (Web Design)

T Network Application Frameworks and XML Web Services and WSDL Tancred Lindholm

Web Design Technology

The presentation explains how to create and access the web services using the user interface. WebServices.ppt. Page 1 of 14

Data Integration Hub for a Hybrid Paper Search

Introduction to XML. Data Integration. Structure in Data Representation. Yanlei Diao UMass Amherst Nov 15, 2007

CA ERwin Data Modeler

XML and Data Integration

<Namespaces> Core XML Technologies. Why Namespaces? Namespaces - based on unique prefixes. Namespaces. </Person>

Cloud Computing, Interactive Websites, and Scientific Research/Education

Terms and Definitions for CMS Administrators, Architects, and Developers

Concepts of Database Management Seventh Edition. Chapter 9 Database Management Approaches

T XML in 2 lessons! %! " #$& $ "#& ) ' */,: -.,0+(. ". "'- (. 1

Advanced PDF workflows with ColdFusion

Multimedia Applications. Mono-media Document Example: Hypertext. Multimedia Documents

Service Description: NIH GovTrip - NBS Web Service

Java and XML parsing. EH2745 Lecture #8 Spring

Comparison of Fully Software and Hardware Accelerated XML Processing

WEB DEVELOPMENT IA & IB (893 & 894)

Short notes on webpage programming languages

CS 501- Software Engineering. Legal Data Markup Software DTD Design Document. Version 1.0

World Wide Web Aka The Internet. Karst Koymans. Friday, October 2, 2015

Chapter 1 Programming Languages for Web Applications

Overview of DatadiagramML

Data Integration through XML/XSLT. Presenter: Xin Gu

Web Programming. Robert M. Dondero, Ph.D. Princeton University

Using XML to Test Web Software Services. Modern Web Sites

MVC web framework based on exist application server and XRX architecture

NHS Education for Scotland Knowledge Services Design and Development Framework

Standard Recommended Practice extensible Markup Language (XML) for the Interchange of Document Images and Related Metadata

[MS-DVRD]: Device Registration Discovery Protocol. Intellectual Property Rights Notice for Open Specifications Documentation

Filen ex_e.xml. Her kommer koderne Det der står skrevet med fed er ændret af grp <?xml version="1.0"?>

Languages for Data Integration of Semi- Structured Data II XML Schema, Dom/SAX. Recuperación de Información 2007 Lecture 3.

<!--=========================================--> <!--=========================================-->

Sage CRM Connector Tool White Paper

XML and Tools. Muhammad Khalid Sohail Khan Mat #: University of Duisburg Essen Germany

MD Link Integration MDI Solutions Limited

Visualization of GML data using XSLT.

Tecnologie per XML. Sara Comai Politecnico di Milano. Tecnologie legate a XML

XML An Introduction. Eric Scharff. Center for LifeLong Learning and Design (L3D)

Structured vs. unstructured data. Semistructured data, XML, DTDs. Motivation for self-describing data

PHP Oracle Web Development Data Processing, Security, Caching, XML, Web Services and AJAX

Appendix 1 Technical Requirements

Chapter 4. Sharing Data through Web Services

Lightweight Data Integration using the WebComposition Data Grid Service

An Empirical Study on XML Schema Idiosyncrasies in Big Data Processing

The Direct Project. Implementation Guide for Direct Project Trust Bundle Distribution. Version March 2013

Internationalization Tag Set 1.0 A New Standard for Internationalization and Localization of XML

Change Management for XML, in XML

IBRI College of Technology Department of Information Technology. Intercollegiate Web Programming Contest On 12 March, 2013 (Tuesday)

COM_2006_023_02.xsd <?xml version="1.0" encoding="utf-8"?> <xs:schema xmlns:xs=" elementformdefault="qualified">

How To Build A System

Session Initiation Protocol (SIP) Registration Extensions

<xs:complextype name="trescdokumentu_typ">

WebCite Technical Background and Best Practices Guide

XSL - Introduction and guided tour

Microsoft Office SharePoint Designer 2007

CST6445: Web Services Development with Java and XML Lesson 1 Introduction To Web Services Skilltop Technology Limited. All rights reserved.

XEP-0043: Jabber Database Access

An XML Based Data Exchange Model for Power System Studies

SPLIT BLOCK FINAL Web Design

Standards, Tools and Web 2.0

JÁN LACKO, EUGEN RUŽICKÝ WEB TECHNOLOGIES AND DESIGN

Effective Management and Exploration of Scientific Data on the Web. Lena Strömbäck Linköping University

Security for industrial automation and control systems: Patch compatibility information

XML. CIS-3152, Spring 2013 Peter C. Chapin

Web Design: A Complete Introduction is by the authors of the popular text books Digital Multimedia and Digital Media Tools

Contents. Introduction Downloading the Data Files... 2

Transcription:

1.264 Lecture 21 XML Quiz 1 review 7pm on either Wednesday next week. Download and unzip Lecture21Download. Put in Lecture21 Web site. Next class: ASP.NET book chapter 10, pages 337-348: Web services only. Exercises due after class 1

What is XML? Extensible Markup Language (XML) is: a World Wide Web Consortium (W3C) standard for a file format to easily and cheaply distribute electronic documents on the World Wide Web extensible, not frozen like HTML supporting rich structure, like objects or hierarchies or relationships supporting validation and well-formed properties avoiding applets, scripts, plug-ins, etc. separating form (how it looks) from content (what it is) 2

XML Concepts XML is self-describing and can be validated: XML document contains the business rules to which its data must conform Rules can be reused in other documents: documents can be more specialized types (inheritance) of a base type XML applications Data interchange format between computers Using Web server as data channel between databases Automated processing of documents exchanged Common format for Web, electronic, paper documents,... XML as a general markup language XML used for manuals, CDs, help and other text documents Handled by standard browsers (IE, Firefox, Chrome, ) Remote procedure call/invocation protocol Executes Web services or processes on other computers 3

XML Document Structure HTML: Head Body Tags are predefined in HTML (or XHTML) standard Tags describe how the page should be displayed XML: Prolog XML declaration (defines version) Document type declaration (defines tags): DTD or XSD Body Tags describe data elements, not how to display them Tags are defined in DTD or XSchema document, which anyone can create 4

Example 1: XML file <?xml version='1.0'?> <!-- The 1.264 reading list --> <booklist> <book topic="software" publicationdate="1996" ISBN="1-55615-900-5"> </book> <title>rapid Development</title> <author> <first-name>steve</first-name> <last-name>mcconnell</last-name> </author> <author> <first-name>bryan</first-name> <last-name>syverson</last-name> </author> <price>48.99</price> <book topic="uml" publicationdate="2004" ISBN="0-321-19368-7"> </book> </booklist> <title>uml Distilled</title> <author> <first-name>martin</first-name> <last-name>fowler</last-name> </author> <price>34.99</price> Books.xml 5

Exercise 1 Start VSW Create a new Web site in VSW File- New Web Site -> Lecture21 (or other name) Download the lecture 21 files from the Web site Move/copy them to the Web site you just created In this Web site, write an XML file that describes the 1.264 class, two groups in the class, and the students in the groups File-> New File -> XML File in VSW Create appropriate elements and/or attributes for the class, groups and students When done, display it in your browser 6

Solution 1- XML <classlist class= 1264 > <group number= 1 > <groupname>rapid Development</groupname> <grouplist> <name>steve Bell</name> <name>jo McDuff</name> </grouplist> </group> <group number= 2 > <groupname>uml Forever</groupname> <grouplist> <name>steve Smith</name> <name>jo Brown</name> </grouplist> </group> </classlist> 7

XML Languages Two ways to express business rules/validate: DTD: Document type declaration: business rules Not XML itself (oddly), being replaced by XML Schema You should understand how to write DTDs in 1.264 XML Schema or XSD: business rules XSD is XML subset, verbose but powerful You don t need to understand the details of XSD in 1.264 There are user-friendly tools to manage these This would be one more download for you; we will just look at them manually Language to format and transform XML document XSLT: extensible stylesheet language/transformation Transforms XML documents Formats XML documents XPath (or XQuery) sublanguage for queries And many others for specialized applications XLink, XPointer, RDF, XForms, see www.w3c.org 8

Validation 1: XSchema Definition (XSD) <?xml version="1.0" encoding="utf-8"?> <xs:schema (details omitted) > <xs:element name="booklist"> <xs:complextype> <xs:sequence> <xs:element maxoccurs="unbounded" name="book"> <xs:complextype> <xs:sequence> <xs:element name="title" type="xs:string" /> <xs:element name="author maxoccurs= unbounded > <xs:complextype> <xs:sequence> <xs:element name="first-name" type="xs:string" /> <xs:element name="last-name" type="xs:string" /> </xs:sequence> </xs:complextype> </xs:element> <xs:element name="price" type="xs:decimal" /> </xs:sequence> <xs:attribute name="topic" type="xs:string" use="required" /> <xs:attribute name="publicationdate" type="xs:unsignedshort" use="required"/> <xs:attribute name="isbn" type="xs:string" use="required" /> </xs:complextype> </xs:element> </xs:sequence> </xs:complextype> </xs:element> </xs:schema> Books.xsd 9

Document Type Declaration (DTD) DOCTYPE: class (type) of document Placed in XML file, refers to DTD file to be used to validate ELEMENT: object in document Either all valid values are given in a list in (), or The element is defined later in the DTD file Symbols: +: 1 or more, *: 0 or more,?:0 or 1, none: exactly 1 ATTLIST: valid attribute list for element #CDATA: character data #PCDATA: parsed character data (can t have < > & ) #REQUIRED: element must be present #IMPLIED: element optional, no default value #FIXED: attribute value is fixed ENTITY: a constant value means OR 10

Validation 2: DTD file <?xml version="1.0" encoding="iso-8859-1"?> <!ELEMENT booklist (book+)> <!ELEMENT book (title, author+, price)> <!ATTLIST book topic (software UML database) "UML" publicationdate CDATA #IMPLIED ISBN CDATA #IMPLIED> <!ELEMENT title (#PCDATA)> <!ELEMENT author (first-name, last-name)> <!ELEMENT first-name (#PCDATA)> <!ELEMENT last-name (#PCDATA)> <!ELEMENT price (#PCDATA)> <!ENTITY currentyear "2013"> Books.dtd 11

Exercise 2: DTD Write a DTD file that states these business rules: The 1.264 class has one to many groups A group has a name, a number, and has one to two (many) students The DTD file specifies the elements and attributes present in the XML file Use the exercise 1 XML file as the basis for your DTD There is no DTD file type in VSW any more Create an html file, rename it to Classlist.dtd or similar, go to Source view and delete all the html so you have just a blank file Show Exercise 1 solution 12

Solution 2- DTD <?xml version="1.0" encoding="iso-8859-1"?> <!ELEMENT classlist (group+)> <!ATTLIST classlist class (1264 ESD264) 1264 > <!ELEMENT group (groupname, grouplist)> <!ATTLIST group number1 CDATA #REQUIRED> <!ELEMENT grouplist (name+)> <!ELEMENT name (#PCDATA)> <!ELEMENT groupname (#PCDATA)> Order of statements may vary 13

XML Summary XML documents can be: Defined by anyone: tags and business rules Sent and received by databases using SQL and HTTP Validated by DTD or XSD files Transformed and styled by XSLT files Placed on a server for clients to attach to, such as blogs XML files are little pieces of a database that can be shared. Typically they represent: Rows from a single table, or Rows from two tables in a many-to-one relationship Any arbitrary set of tables/relationships can be sent 14

Glossary W3C: World Wide Web Consortium (standards) DTD: Document Type Declaration ( XML validation) XML Schema or XSD: XML validation XSLT: XML Stylesheet Language/Tranformation Modifies or queries XML documents XPath: XSLT query sublanguage XQuery: XSLT query sublanguage 15

MIT OpenCourseWare http://ocw.mit.edu 1.264J / ESD.264J Database, Internet, and Systems Integration Technologies Fall 2013 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.