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

Similar documents
extensible Markup Language

XML Metadata Standards and Topic Maps

Structured documents

COMP9321 Web Application Engineering

11. EXTENSIBLE MARKUP LANGUAGE (XML)

COMP9321 Web Application Engineering

XML: Extensible Markup Language

The XML Metalanguage

COMP9321 Web Application Engineering

Introduction to XML. XML: basic elements

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

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

Web Technologies Present and Future of XML

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

Contents. Markup Language and the need of XML. Using environment XML and growth direction. To understand dxml standard.

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

W3C XML XML Overview

COMP9321 Web Application Engineering

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

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

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

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

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

Web Standards Mastering HTML5, CSS3, and XML

IBM. XML and Related Technologies Dumps Braindumps Real Questions Practice Test dumps free

EMERGING TECHNOLOGIES. XML Documents and Schemas for XML documents

COMP9321 Web Application Engineering. Extensible Markup Language (XML)

1.264 Lecture 13 XML

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

References differences between SVG 1.1 Full and SVG 1.2 Tiny

XML and Agent Communication

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

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

Data Presentation and Markup Languages

YaPPI Yet another Particle Property Interface

Metadata and Encoding Standards for Digital Initiatives: An Introduction

XML: Managing with the Java Platform

DCMI Abstract Model - DRAFT Update

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


World-Wide Wide Web. Netprog HTTP

IT6801-SERVICE ORIENTED ARCHITECTURE

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

Labelling & Classification using emerging protocols

M359 Block5 - Lecture12 Eng/ Waleed Omar

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

Jay Lofstead under the direction of Calton Pu

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

SDPL : XML Basics 2. SDPL : XML Basics 1. SDPL : XML Basics 4. SDPL : XML Basics 3. SDPL : XML Basics 5

SRI VIDYA COLLEGE OF ENGINEERING & TECHNOLOGY- VIRUDHUNAGAR

Introduction Syntax and Usage XML Databases Java Tutorial XML. November 5, 2008 XML

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

XML Overview, part 1

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

XML ALONE IS NOT SUFFICIENT FOR EFFECTIVE WEBEDI

- XML. - DTDs - XML Schema - XSLT. Web Services. - Well-formedness is a REQUIRED check on XML documents

> Semantic Web Use Cases and Case Studies

KINGS COLLEGE OF ENGINEERING 1

Standard Business Rules Language: why and how? ICAI 06

Using UML To Define XML Document Types

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

Metadata Standards and Applications. 4. Metadata Syntaxes and Containers

XML & Related Languages

XML: the document format of the future?

8. Markup Languages. Characteristics of Computer-Use Markup Languages. Markup. Markup language- History

Device Independent Principles for Adapted Content Delivery

XF Rendering Server 2008

CS6501 IP Unit IV Page 1

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

Grid Computing. What is XML. Tags, elements, and attributes. Valid and well formed XML. Grid Computing Fall 2006 Paul A.

Author: Irena Holubová Lecturer: Martin Svoboda

XML 2 APPLICATION. Chapter SYS-ED/ COMPUTER EDUCATION TECHNIQUES, INC.

Some more XML applications and XML-related standards (XLink, XPointer, XForms)

OOoCon XML For The Massses An Open Office XML File Format by Michael Brauer

XML in the bipharmaceutical

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

CTI Short Learning Programme in Internet Development Specialist

Lecture Telecooperation. D. Fensel Leopold-Franzens- Universität Innsbruck

mapping IFC versions R.W. Amor & C.W. Ge Department of Computer Science, University of Auckland, Auckland, New Zealand

SERVICE ORIENTED ARCHITECTURE 2 MARK QUESTION WITH ANSWER

Chapter 2 XML, XML Schema, XSLT, and XPath

Chapter 7: XML Namespaces

XML and XSLT. XML and XSLT 10 February

Chapter 1: Getting Started. You will learn:

XML. Jonathan Geisler. April 18, 2008

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

Table of Contents WWW. WWW history (2) WWW history (1) WWW history. Basic concepts. World Wide Web Aka The Internet. Client side.

CTI Higher Certificate in Information Systems (Internet Development)

Chapter 10: Understanding the Standards

Inf 202 Introduction to Data and Databases (Spring 2010)

Tradeoffs and Guidelines for Selecting Technologies to Generate Web Content from Relational Data Stores

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

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

No Grammar Constraints (dtd Or Xml Schema) Referenced In The Document. Build.xml

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

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

XML. Objectives. Duration. Audience. Pre-Requisites

Automated Classification. Lars Marius Garshol Topic Maps

An Evaluation of Geo-Ontology Representation Languages for Supporting Web Retrieval of Geographical Information

Solutions. a. Yes b. No c. Cannot be determined without the DTD. d. Schema. 9. Explain the term extensible. 10. What is an attribute?

Transcription:

A tutorial report for SENG 609.22 Agent Based Software Engineering Course Instructor: Dr. Behrouz H. Far XML Tutorial Yanan Zhang Department of Electrical and Computer Engineering University of Calgary zhangy@enel.ucalgary.ca

1. What is XML XML stands for Extensible Markup Language, which is a markup language for documents containing structured information Both XML itself and its related technologies are developed and approved by the World Wide Web Consortium (W3C), which was created in October 1994 to lead the World Wide Web to its full potential by developing common protocols that promote its evolution and ensure its interoperability. W3C has more than 500 Member organizations from around the world and as earned international recognition for its contributions to the growth of the Web. XML was designed to describe data. It is a method for putting structured data in a text file. XML looks a bit like HTML but isn't HTML Like HTML, XML makes use of tags (words bracketed by '<' and '>') and attributes (of the form name="value"), but while HTML specifies what each tag & attribute means (and often how the text between them will look in a browser), XML uses the tags only to delimit pieces of data, and leaves the interpretation of the data completely to the application that reads it. XML is text, but isn't meant to be read. XML files are text files but even less than HTML are they meant to be read by humans. They are text files, because that allows experts (such as programmers) to more easily debug applications, and in emergencies, they can use a simple text editor to fix a broken XML file. But the rules for XML files are much stricter than for HTML. A forgotten tag, or an attribute without quotes makes the file unusable, while in HTML such practice is often explicitly allowed, or at least tolerated. It is written in the official XML specification: applications are not allowed to try to second-guess the creator of a broken XML file; if the file is broken, an application has to stop right there and issue an error. XML is verbose, but that is not a problem Since XML is a text format, and it uses tags to delimit the data, XML files are nearly always larger than comparable binary formats. That was a conscious decision by the XML developers. The advantages of a text format are evident, and the disadvantages can usually be compensated at a different level. Disk space isn't as expensive anymore as it used to be, and programs like zip and gzip can compress files very well and very fast. Those programs are available for nearly all platforms (and are usually free). In addition, communication protocols such as modem protocols and HTTP/1.1 (the core protocol of the Web) can compress data on the fly, thus saving bandwidth as effectively as a binary format.

XML is new, but not that new. Development of XML started in 1996 and it is a W3C standard since February 1998, which may make you suspect that this is rather immature technology. But in fact the technology isn't very new. Before XML there was SGML, developed in the early '80s, an ISO standard since 1986, and widely used for large documentation projects. And of course HTML, whose development started in 1990. The designers of XML simply took the best parts of SGML, guided by the experience with HTML, and produced something that is no less powerful than SGML, but vastly more regular and simpler to use. Some evolutions, however, are hard to distinguish from revolutions... And it must be said that while SGML is mostly used for technical documentation and much less for other kinds of data, with XML it is exactly the opposite. XML is license-free, platform-independent and well-supported By choosing XML as the basis for some project, you buy into a large and growing community of tools (one of which may already do what you need!) and engineers experienced in the technology. Opting for XML is a bit like choosing SQL for databases: you still have to build your own database and your own programs/procedures that manipulate it, but there are many tools available and many people that can help you. And since XML, as a W3C technology, is license-free, you can build your own software around it without paying anybody anything. The large and growing support means that you are also not tied to a single vendor. XML isn't always the best solution, but it is always worth considering. 2. XML is a family of technologies XML1.0 W3C Recommendation Feb '98 The specification that defines what "tags" and "attributes" are, but around XML 1.0, there is a growing set of optional modules that provide sets of tags & attributes, or guidelines for specific tasks. Xlink XML Linking Language Xpointer XML Linking Language, which allows elements to be inserted into XML documents in order to create and describe links between resources. It uses XML syntax to create structures that can describe links similar to the simple unidirectional hyperlinks of today's HTML, as well as more sophisticated links. Supports addressing into the internal structures of XML documents. Xpointer is based on the XML Path Language (XPath), supports addressing into the internal structures of XML documents.

XSL The Extensible Stylesheet Language It consists of three parts: XSL Transformations (XSLT): a language for transforming XML documents; the XML Path Language (XPath), an expression language used by XSLT to access or refer to parts of an XML document. (XPath is also used by the XML Linking specification). The third part is XSL Formatting Objects: an XML vocabulary for specifying formatting semantics. DOM Document Object Model The Document Object Model is a platform- and language-neutral interface that will allow programs and scripts to dynamically access and update the content, structure and style of documents. XML Namespaces Prevent name conflicts between your tags and somebody else s. XML is designed to be modular and extensible, providing a simple method for qualifying element and attribute names used in Extensible Markup Language documents by associating them with namespaces identified by URI references. So you should to be able to reuse modules from other DTDs in your own work. XML Schemas Inherited from SGML the DTD mechanism for defining grammar rules. XML Schema several advantages over DTDs: 1.It uses XML syntax, and so can be produced and edited using standard XML tools. 2.It is a more detailed system of data types. 3.Users can define their own data types, including structured data types. 3. Main Uses of XML Creating documents for publishing on the Web and elsewhere Encoding data, including data extracted from relational database Configuring computer programs Developing domain-specific vocabularies and DTDs

4. A Simple Example <?xml version= 1.0?> <!DOCTYPE exchange [ <!ELEMENT exchange (greeting, response)> <!ELEMENT greeting (#PCDATA)> <!ELEMENT response (#PCDATA)> <!ATTLIST greeting mode(warm luke-warm cool cold) warm <! -- warm is the default-- > > ]> <exchange> <greeting mode= warm wording = semi-formal > Hello, XML</greeting> <response> Hello, what can I do for you?</response> </exchange> document declaration exchange greeting response attributes text text mode:warm Hello,XML Hollo,what can I do for you?

5. How it works An XML documents is an information unit that can be viewed in two ways: as a linear sequence of characters that contains character data and markup, or as an abstract data structure that is a tree of nodes. To switch it from the linear view to the structure view, you need an XML processor, also known as an XML parser. Document Type Definition or DTD is a formally defined grammar that expresses constraints on the document s content. XML Data XML Parser Standard Interfaces Application 6. XML Applications SVG (Scalable Vector Graphics) SVG is a language for describing two-dimensional graphics in XML. SVG allows for three types of graphic objects: vector graphic shapes (e.g., paths consisting of straight lines and curves), images and text. Graphical objects can be grouped, styled, transformed and composited into previously rendered objects. JSP (JavaServer Pages) JSP is to simplfy the creation and management of dynamic web pages, by separating content and presentation. JSPs are basically files that combine standard HTML or XML and new scripting tags. They get translated into Java servlets the first time they are invoked by a client. RDF (Resource Description Framework) The Resource Description Framework using XML as an interchange syntax. The RDF specifications provide a lightweight ontology system to support the exchange of knowledge on the Web. The Resource Description Framework (RDF) is an infrastructure that enables the encoding, exchange and reuse of structured metadata. Metadata is machine understandable information for the web. It is an application of XML that imposes needed structural constraints to provide unambiguous methods of expressing semantics. RDF additionally provides a means for publishing both human-readable and machine-processable vocabularies designed to encourage the reuse and extension of metadata semantics among disparate information communities. The structural constraints RDF imposes to support the consistent encoding and exchange of standardized metadata provides for the interchangeability of separate packages of metadata defined by different resource description communities. Multiple languages for industry, finance, sciences, news and entertainment

7. Why XML is Great It s easy, both technically and practically, fast, reliable, ubiquitous and free. No special arrangements are needed between the sender and the recipient: XML data is always network-ready. Explicit public standards define not only the inputs to XML processors but also their outputs. Application don t have to worry about which processor they use, and can concentrate on using and transforming the documents as data objects. 8. XML with MultiAgent System Once the web has been sufficiently "populated" with rich metadata, what can we expect? First, searching on the web will become easier as search engines have more information available, and thus searching can be more focused. Doors will also be opened for automated software agents to roam the web, looking for information for us or transacting business on our behalf. The web of today, the vast unstructured mass of information, may in the future be transformed into something more manageable - and thus something far more useful. The effective use of metadata among applications requires common conventions about semantics, syntax, and structure. The design of enabling infrastructures such as RDF to support these constructs provides the necessary foundations to support the management of information on the web and provides the ability for transforming the web into a more useful and powerful information resource. 9. Reference www.xml.com www.w3.org agents.umbc.edu www.multiagent.com Professional Java Server Programming J2EE Edition