Introduction to XML. Asst. Prof. Dr. Kanda Runapongsa Saikaew Dept. of Computer Engineering Khon Kaen University

Similar documents
Introduction to XML 3/14/12. Introduction to XML

Well-formed XML Documents

XML Parsers. Asst. Prof. Dr. Kanda Runapongsa Saikaew Dept. of Computer Engineering Khon Kaen University

Delivery Options: Attend face-to-face in the classroom or remote-live attendance.

XML. Jonathan Geisler. April 18, 2008

The XML Metalanguage

Delivery Options: Attend face-to-face in the classroom or via remote-live attendance.

XML Update. Royal Society of the Arts London, December 8, Jon Bosak Sun Microsystems

COMP9321 Web Application Engineering

XML for Java Developers G Session 8 - Main Theme XML Information Rendering (Part II) Dr. Jean-Claude Franchitti

Web Standards Mastering HTML5, CSS3, and XML

A tutorial report for SENG Agent Based Software Engineering. Course Instructor: Dr. Behrouz H. Far. XML Tutorial.

XML: Introduction. !important Declaration... 9:11 #FIXED... 7:5 #IMPLIED... 7:5 #REQUIRED... Directive... 9:11

XML. Objectives. Duration. Audience. Pre-Requisites

1.264 Lecture 13 XML

Lesson 14 SOA with REST (Part I)

Introduction to XML. XML: basic elements

COMP9321 Web Application Engineering

XML Applications. Introduction Jaana Holvikivi 1

Structured documents

Agenda. Summary of Previous Session. XML for Java Developers G Session 7 - Main Theme XML Information Rendering (Part II)

Shankersinh Vaghela Bapu Institue of Technology

Copyright 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley. Chapter 7 XML

Introduction to Information Systems

CSI 3140 WWW Structures, Techniques and Standards. Representing Web Data: XML

Extreme Java G Session 3 - Sub-Topic 5 XML Information Rendering. Dr. Jean-Claude Franchitti

7.1 Introduction. extensible Markup Language Developed from SGML A meta-markup language Deficiencies of HTML and SGML

Comp 336/436 - Markup Languages. Fall Semester Week 4. Dr Nick Hayward

XML Metadata Standards and Topic Maps

XML: Extensible Markup Language

The Wonderful World of XML. Presented by Laurie K. Brooks AML Consulting, Inc.

Languages in WEB. E-Business Technologies. Summer Semester Submitted to. Prof. Dr. Eduard Heindl. Prepared by

Data Presentation and Markup Languages

SRI VIDYA COLLEGE OF ENGINEERING & TECHNOLOGY- VIRUDHUNAGAR

11. EXTENSIBLE MARKUP LANGUAGE (XML)

A network is a group of two or more computers that are connected to share resources and information.

Jay Lofstead under the direction of Calton Pu

Tutorial 1 Getting Started with HTML5. HTML, CSS, and Dynamic HTML 5 TH EDITION

Create web pages in HTML with a text editor, following the rules of XHTML syntax and using appropriate HTML tags Create a web page that includes

Agenda. XML Generics. XML for Java Developers G Session 1 - Main Theme Markup Language Technologies (Part I)

COMP9321 Web Application Engineering. Extensible Markup Language (XML)

Markup Languages SGML, HTML, XML, XHTML. CS 431 February 13, 2006 Carl Lagoze Cornell University

W3C XML XML Overview

XML for Java Developers G Session 2 - Sub-Topic 1 Beginning XML. Dr. Jean-Claude Franchitti

Chapter 1: Getting Started. You will learn:

Web Programming Paper Solution (Chapter wise)

XML: Managing with the Java Platform

XML Overview, part 1

x ide xml Integrated Development Environment Specifications Document 1 Project Description 2 Specifi fications

Comp 336/436 - Markup Languages. Fall Semester Week 4. Dr Nick Hayward

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF INFORMATION TECHNOLOGY. (An NBA Accredited Programme) ACADEMIC YEAR / EVEN SEMESTER

XML: the document format of the future?

Chapter 2 XML, XML Schema, XSLT, and XPath

xml:tm Using XML technology to reduce the cost of authoring and translation

Introduction to REST Web Services

METADATA INTERCHANGE IN SERVICE BASED ARCHITECTURE

Chapter 10 Web-based Information Systems

XML Processing & Web Services. Husni Husni.trunojoyo.ac.id

National Language Support for Windows NT and AIX Now Available with IBM WebSphere Application Server V3.0.1, Standard Edition

Website Report for facebook.com

Hospitality Industry Technology Integration Standards Glossary of Terminology

XML in the bipharmaceutical

JENA: A Java API for Ontology Management

Introduction to JSON. Roger Lacroix MQ Technical Conference v

extensible Markup Language

UNIT-II : VIRTUALIZATION & COMMON STANDARDS IN CLOUD COMPUTING

Author: Irena Holubová Lecturer: Martin Svoboda

XML and Agent Communication

Extensible Markup Language (XML) Hamid Zarrabi-Zadeh Web Programming Fall 2013

Chapter 3. Architecture and Design

Hypertext Markup Language, or HTML, is a markup

XML. extensible Markup Language. Overview. Overview. Overview XML Components Document Type Definition (DTD) Attributes and Tags An XML schema

Java EE 7: Back-end Server Application Development 4-2

ActiveVOS Technologies

Agenda. Summary of Previous Session. XML for Java Developers G Session 6 - Main Theme XML Information Processing (Part II)

CSC Web Technologies, Spring Web Data Exchange Formats

MyMobileWeb project's position

Acceptance Test. Smart Scheduling. Empire Unlimited. Requested by:

Chapter 10: Understanding the Standards

Part III: Survey of Internet technologies

Web Design and Application Development

Inf 202 Introduction to Data and Databases (Spring 2010)

Publishing Technology 101 A Journal Publishing Primer. Mike Hepp Director, Technology Strategy Dartmouth Journal Services

The main Topics in this lecture are:

ESPRIT Project N Work Package H User Access. Survey

HTML, XHTML, and CSS. Sixth Edition. Chapter 1. Introduction to HTML, XHTML, and

Active Documents in XML

IT2353 WEB TECHNOLOGY Question Bank UNIT I 1. What is the difference between node and host? 2. What is the purpose of routers? 3. Define protocol. 4.

.. Cal Poly CPE/CSC 366: Database Modeling, Design and Implementation Alexander Dekhtyar..

Website Report for bangaloregastro.com

M359 Block5 - Lecture12 Eng/ Waleed Omar

Active Endpoints. ActiveVOS Platform Architecture Active Endpoints

PASS4TEST. IT Certification Guaranteed, The Easy Way! We offer free update service for one year

Data Exchange. Hyper-Text Markup Language. Contents: HTML Sample. HTML Motivation. Cascading Style Sheets (CSS) Problems w/html

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

Intro to XML. Borrowed, with author s permission, from:

Web Technologies Present and Future of XML

XF Rendering Server 2008

HTML and XML. XML stands for extensible Markup Language

Web Programming Pre-01A Web Programming Technologies. Aryo Pinandito, ST, M.MT

Transcription:

Introduction to XML Asst. Prof. Dr. Kanda Runapongsa Saikaew Dept. of Computer Engineering Khon Kaen University http://gear.kku.ac.th/~krunapon/xmlws 1

Topics p What is XML? p Why XML? p Where does XML come from? p Where is XML being used today? p What is going on standards front? 2

What is XML? (1/2) <?xml version= 1.0?> <nation id= th > <name>thailand</name> <location>southeast Asia </location> </nation> 3

What is XML? (2/2) p XML stands for Extensible Markup Language p It becomes the standard for data interchange on the Internet p XML is a text-based markup language n Encode the meaning of data by using tags which are acted as markup n Tags are surrounded by < and > n Example: <Nationality>Thai</Nationality> p It is also a meta-markup language 4

An XML Document in Text Editor 5

Markup Language p Used to markup data n Methodology for encoding data with some information p Examples n Yellow highlighter on a string of text as emphasizer p Example: Many people view Thai as friendly people n Comma between pieces of data as separator p Example: People need food, clothes, medicine, and house 6

XML: Markup Language by W3C 7

XML, HTML, and SGML p XML is a markup language defined by the World Wide Web Consortium (W3C, www.w3c.org) p Markup languages describe the way the content of the document should be interpreted p The markup language that most people know is HTML p Both HTML and XML are defined based on SGML (Standard Generalized Markup Language) 8

SGML p SGML is used for documents in many fields, such as Aerospace, Semiconductor, and Publishing p Several barriers prevented SGML over the Web n Complex and unstable software n Obstacles to interchange of SGML data n No widely supported style sheets 9

HTML p The most popular markup language n In 1998, Google search 28 million pages n In 2005, Google search 8 billion pages n In 2008, Google search 1 trillion pages p Designed for presentation for data n Examples: <html>, <head>, <body>, <title> p HTML documents are processed by HTML processing application (Browser) 10

View an XML Document with Firefox Browser 11

View an XML Document with Internet Explorer Browser 12

Strengths of HTML p Easy to implement and author n Small number of tags n Simple relationship between tags n Syntax-checking is very forgiving n Limited number of formats possible n Viewers can be small and simple p HTML trades power for ease of use 13

Weaknesses of HTML (1/2) p Fixed set of tags n Not user extensible p Dependency to markup language definition process n Dependency to vendors p Vendor proprietary tags p Implementation not in sync Netscape browser vs. Internet Explorer browser p Predefined semantics for each tag p Predefined data structure 14

Weaknesses of HTML (2/2) p No formal validation p Does not support semantic search p Based on solely on appearance (rendering) NOT on content p Formatting too simple n Limited control p Cannot process complex documents p Have no document structure to enable automation 15

What We Cannot Do with HTML p We cannot create our own tags that are meaningful for each application p We cannot have the way to specify a set of data that everyone agrees upon p We cannot change shared data easily with minimal effort 16

The Purpose of XML p Easy for information to be reused, interchanged, and automated p Deliver information on the Web p Let users design their own markup language p Could drive arbitrarily complex distributed processes 17

Key Features of XML p Extensibility p Media and Presentation independence n Separation of contents from presentation p Structure p Validation 18

Extensibility (1/2) p XML is Meta-markup language p You define your own markup languages (tags) for your own problem domain p Infinite number of tags can be defined n Need for domain-specific standards n XSLT 19

Extensibility (2/2) p Tags can be more than formatting n Semantics data representation n Business rules p ebxml n Data relationship p EJB 2.0 Container Managed Persistence n Formatting p XSL n Anything you want 20

Media (Presentation) Independence (1/2) p Clear separation between contents and presentation p Contents of data n What the data is n Is represented by XML document p Presentation of data n What the data looks like n Can be specified by stylesheet 21

Media (Presentation) Independence (2/2) p Stylesheet n Instruction of how to present XML data n CSS p Tailored for HTML browser n XSL p XML based p General purpose p Work with XSLT 22

Separation of Contents from Presentation p Searching and retrieving data is easy and efficient n Tags give search able information p Many applications use the same data in different ways n Employee data can be used by p Payroll application and Facilities application p Enables portability of data n Portable over time and space 23

XSLT Transformation p Example (XML -> HTML) XML: <email>joe@nbc.com</email> XSLT stylesheet can say: p Start a new line p Convert email XML tag to To: HTML tag p Display To: in bold, followed by a space p Display your email address Which produces To:joe@nbc.com 24

Input XML File 25

Output HTML File in Browsers 26

Input XSL File 27

Structure: HTML vs. XML p HTML (Automatic Presentation of Data) <b> John Doe 1234 </b> // Display in bold p XML (Automatic Interpretation of Data) <employee> <name>john Doe</name> <employeeid>1234</employeeid> </employee> 28

XML Structure p Relationship n Employee is made of Name and EmployeeID p Hierarchical (Tree-form) n Faster to access n Easier to rearrange n Can be any number of depth p Enables to build large and complex data p Portability of relationship and hierarchical structure 29

Desirable Features of XML p Semantics of data p Plain Text p Easily Processed p Inline usability p Internationalized p License-free 30

Semantics of Data p Meaning of data p XML tags indirectly specifies the semantical meaning n Does <name> means firstname lastname or lastname firstname? p Potential for divergence n Industry collaboration to agree upon the semantical meanings of tags n Need for transformation (XSLT) 31

Plain Text p Can use any text-editing tool p Easier for humans to read and edit n Configuration information n Information description n Short notices p Any operating system supports reading and writing text 32

Easily Processed p Set of Well-formed rules p Validity checking p Ready-to-use tools n Parsers and validators n Transformers n Browsers n IDE 33

Inline Usability p Can integrate data from multiple resources n Can be displayed or processed as a single document p Modularization without using Linking p Example n A book made of independently written chapters n Same Copyright text in many books 34

Internationalized p XML is Unicode-based n You can mix languages p Both markup and content p XML tools must support both UTF-8 and UTF-16 encodings p Critical for world-wide adoption of XML as universal data representation 35

Where Does XML Get Used? p Simple and complex data representation p Integration of heterogeneous applications p Portable data representation p Displaying and publishing 36

Data Representation p XML encodes the data for a program to process p Readable by humans p Be able to be processed by computers p Complex relationship can be represented p Internationalized p Many 3 rd -party tools n Editing, Syntax checking 37

Data Representation Examples p Configuration files n EJB deployment descriptor p make files (Apache ANT project) p MSN message history p File format for electronic office documents n OASIS OpenDocument format (ODF) n Microsoft Office Open XML (OOXML) 38

Integration of Heterogeneous Applications p Typically used with Messaging system p XML message is minimum contract for communication n Loosely-coupled communication p Enables easy EAI (Enterprise Application Integration) n Payroll, Finance, Products p E-commerce n Supplier, distributor, manufacturer, retail 39

Portable Data Representation p Non-proprietary n Application independent n Object-model independent n Language independent n Platform independent n Communication protocol independent n Communication media independent p Used for means of information exchange 40

Portable Data Representation Examples p Purchase order, Invoice p Business transactional semantics p Patient record p Mathematical formula p Musical notation p Manufacturing process 41

Displaying and Publishing p Common data for different presentations p Separation of contents from presentation p Examples n Web information presented to different client types n Information rendered to different medium 42

Developer Activities on XML (1/2) p Creating XML document n Mostly by text-editor or WISWIG tools n Programmatically p Sending and Receiving XML document n Over any kind of transports p HTTP, SMTP, FTP, n Through programming APIs p Socket APIs 43

Developer Activities on XML (2/2) p Parsing XML document n Convert XML document into programming objects p Manipulating programming objects n Application specific way n Examples p Display p Save them in database p Create new XML document 44

XML Standards p XML Specification n XML, Namespaces p Validation n W3C XML Schema p Parser n DOM, SAX, StAX p Style and Query n XSL, XSLT, XPath p Security n XML Digital Signature, XML Encryption 45

XML Applications p Web Services n XML data is exchanged between service provider & service requester n RSS, ATOM p AJAX n Asynchronous JavaScript and XML n AJAX allows Web developers to create interactive Web pages without having to wait for pages to load 46

XML Applications p Web Services n XML data is exchanged between service provider & service requester n RSS, ATOM p AJAX n Asynchronous JavaScript and XML n AJAX allows Web developers to create interactive Web pages without having to wait for pages to load 47

XML in Modern Software p Android p WPF p Declare UI elements in XML p WPF employs XAML, a derivative of XML, to define and link various UI elements p Firefox Extension p Use XUL (XML User Interface Language, pronounced zool) to define GUIs

References (1/2) p XML standards portal http://www.w3.org/xml p XML resources n http://www.xml.com n http://www.oasis-open.org n http://www.xml.org p XML Tutorials n http://www-106.ibm.com/developerworks/views/ xml/tutorials.jsp n http://www.zvon.org p Sang Shin XML Course Page http://www.javapassion.com/xml/ 49

References (2/2) p Wikipedia, OpenDocument, http:// en.wikipedia.org/wiki/opendocument p Wikipedia, Office Open XML, http:// en.wikipedia.org/wiki/office_open_xml p Devx.com, StaX: DOM Ease with SAX Efficiency, http://www.devx.com/java/article/ 30298 50