Extensible Markup Language XML

Slides:



Advertisements
Similar presentations
XML-XSL Introduction SHIJU RAJAN SHIJU RAJAN Outline Brief Overview Brief Overview What is XML? What is XML? Well Formed XML Well Formed XML Tag Name.
Advertisements

What is XML? a meta language that allows you to create and format your own document markups a method for putting structured data into a text file; these.
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.
XHTML1 Building Document Structure. XHTML2 Objectives In this chapter, you will: Learn how to create Extensible Hypertext Markup Language (XHTML) documents.
Chapter 10 © 2001 by Addison Wesley Longman, Inc. 1 Chapter 10 Sebesta: Programming the World Wide Web.
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved Chapter 7 Representing Web Data:
Tutorial 11 Creating XML Document
XML Primer. 2 History: SGML vs. HTML vs. XML SGML (1960) XML(1996) HTML(1990) XHTML(2000)
ECA 228 Internet/Intranet Design I Intro to XML. ECA 228 Internet/Intranet Design I HTML markup language very loose standards browsers adjust for non-standard.
XML introduction to Ahmed I. Deeb Dr. Anwar Mousa  presenter  instructor University Of Palestine-2009.
Introduction to XML cs3505. References –I got most of this presentation from this site –O’reilly tutorials.
XML CPSC 315 – Programming Studio Fall 2008 Project 3, Lecture 1.
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.
E0262 – MIS – Multimedia Storage Techniques XML (Extensible Markup Language)  XML is a markup language for creating documents containing structured information.
XML 1 Enterprise Applications CE00465-M XML. 2 Enterprise Applications CE00465-M XML Overview Extensible Mark-up Language (XML) is a meta-language that.
August Chapter 2 - Markup and Core Concepts Learning XML by Erik T. Ray Slides were developed by Jack Davis College of Information Science and Technology.
What is XML?  XML stands for EXtensible Markup Language  XML is a markup language much like HTML  XML was designed to carry data, not to display data.
These Questions are copied from
 XML is designed to describe data and to focus on what data is. HTML is designed to display data and to focus on how data looks.  XML is created to structure,
Tutorial 1: XML Creating an XML Document. 2 Introducing XML XML stands for Extensible Markup Language. A markup language specifies the structure and content.
1 Chapter 10: XML What is XML What is XML Basic Components of XML Basic Components of XML XPath XPath XQuery XQuery.
Softsmith Infotech XML. Softsmith Infotech XML EXtensible Markup Language XML is a markup language much like HTML Designed to carry data, not to display.
E0262 – MIS – Multimedia Storage Techniques XML (Extensible Markup Language  XML is a markup language for creating documents containing structured information.
XML 2nd EDITION Tutorial 1 Creating An Xml Document.
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.
XML Documents Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University Elements Attributes Comments PI Document.
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.
Lecture 16 Introduction to XML Boriana Koleva Room: C54
Accessing Data Using XML CHAPTER NINE Matakuliah: T0063 – Pemrograman Visual Tahun: 2009.
XML EXtensible Markup Language. Agenda Introduction to XML XML Rules XML Elements XML Attributes XML Validation XML Exercises XML Namespaces XML CDATA.
Web Technologies COMP6115 Session 4: Adding a Database to a Web Site Dr. Paul Walcott Department of Computer Science, Mathematics and Physics University.
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.
1 Credits Prepared by: Rajendra P. Srivastava Ernst & Young Professor University of Kansas Sponsored by: Ernst & Young, LLP (August 2005) XBRL Module Part.
XML Introduction. What is XML? XML stands for eXtensible Markup Language XML stands for eXtensible Markup Language XML is a markup language much like.
The eXtensible Markup Language (XML). Presentation Outline Part 1: The basics of creating an XML document Part 2: Developing constraints for a well formed.
What it is and how it works
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.
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.
Internet & World Wide Web How to Program, 5/e. © by Pearson Education, Inc. All Rights Reserved.2.
1 herbert van de sompel CS 502 Computing Methods for Digital Libraries Cornell University – Computer Science Herbert Van de Sompel
COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 4 1COMP9321, 15s2, Week.
225 City Avenue, Suite 106 Bala Cynwyd, PA , phone , fax presents… XML Syntax v2.0.
Well Formed XML The basics. A Simple XML Document Smith Alice.
XML CSC1310 Fall HTML (TIM BERNERS-LEE) HyperText Markup Language  HTML (HyperText Markup Language): December  Markup  Markup is a symbol.
C Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Introduction to XML Standards.
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:
CHAPTER NINE Accessing Data Using XML. McGraw Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved Introduction The eXtensible.
XML Notes taken from w3schools. What is XML? XML stands for EXtensible Markup Language. XML was designed to store and transport data. XML was designed.
Extensible Markup Language (XML) Pat Morin COMP 2405.
XML intro. What is XML? XML stands for EXtensible Markup Language XML is a markup language much like HTML XML was designed to carry data, not to display.
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
Jim Fawcett CSE 686 – Internet Programming Summer 2006
XML QUESTIONS AND ANSWERS
Jim Fawcett CSE 681 – Software Modeling and Analysis Fall 2007
Extensible Markup Language XML
The XML Language.
XML Technologies and Related Applications
Session III Chapter 6 – Creating DTDs
Chapter 7 Representing Web Data: XML
Creating an XML Document
Session II Chapter 6 – Creating DTDs
Allyson Falkner Spokane County ISD
Review of XML IST 421 Spring 2004 Lecture 5.
Presentation transcript:

Extensible Markup Language XML Jim Fawcett CSE687 – Object Oriented Design Spring 2006

Introduction XML is a tagged markup language designed to describe data: LectureNote.xml XML has only a couple of predefined tags All the rest are defined by the document designer. XML can be used to create languages XML uses a Document Type Definition (DTD) or XML Schema to define an XML document type. DTD or Schema define allowable tags, attributes, and value types.

XML Element Elements are the building blocks for XML documents Element sytax: Elements are composed of tags, attributes, and a body: <tag *[attribName=“value”]>body</tag> example: <book author=“Prosise”>Programming .Net</book> All parts of the element are text body may contain both text and markup, e.g. lower level elements. Tags and attributes are case sensitive and user defined.

Element Naming Rules XML names are composed of unicode characters Tag names must begin with a letter or underscore Other tag name characters may contain characters, underscores, digits, hypens, and periods Names may not contain spaces nor start with the string “xml” or any case variant. Attribute names follow the same rules as tag names, and are also required to be unique within the tag in which they are embedded.

Element Body Rules Element bodies may contain text or markup or both. By text, we mean character strings with no markup. Markup is text with embedded markup characters: & < > ‘ and “ Elements may also contain CDATA sections, designed to support text including large sections of markup but not interpreted as markup: <! [CDATA[ … ]]> These cannot be used to carry binary data.

Illegal Characters Certain characters are reserved for markup and are illegal in names and payload text: < < less than > > greater than & & ampersand  &apos; ‘ apostrophe " “ quotation mark We represent them in XML with the escape sequence shown on the left, e.g.: < if we want a less than character in payload text.

XML Structure An XML document is defined by a standard opening element: <?xml version=“1.0” ?> This is the only XML tag that is not closed (see next page) The XML body starts with a single root element. An element is text of the form: <someTag anAttribute=“someValue”>payload text</someTag> where the payload may be one or more child elements or simply text or both. Comments take the form: <!– a comment -->

Well-Formed XML XML has a few rules: There may be only a single root All tags, except for processing instructions, must be closed: <myTag someAttrib=“value”>…</myTag> <myTag someAttrib=“value”/> Attribute values must be quoted XML tags are case sensitive All markup and payload is text with one exception: An element may define a CDATA section CDATA is not parsed, and so may contain anything except the CDATA terminator

CDATA A CDATA section has the syntax: <![CDATA[ … ]]> CDATA is not parsed except to look for the terminator “]]” so it may containing anything. It is not a good idea to try to store binary data in a CDATA section because the “]]>” sequence could appear as part of the binary data.

XML Documents An XML document is well-formed XML that contains: A prolog: <? xml version=“1.0” ?> Optional processing instructions An optional reference to a DTD or schema, used for validation Optional comments A body with a single root, which can contain any number of text sections, elements, and comments An optional epilogue consisting of comments and processing instructions

Processing Instructions Processing instructions are used to capture information for XML parsers and proprietary applications. Syntax: <? PI-target *[attrib=“value”]?> The most common processing instructions are: Document banner: <? xml version=“1.0” encoding="utf-8" ?> XSLT style-sheet reference: <?xml-stylesheet type="text/xsl" href="courses.xsl" ?> Other hypothetical instructions: <? robots index="no" follow="yes“ ?> <? word document=“aDoc.doc” ?>

Namespaces Namespaces are declared with special attributes and prefixes: <tag xmlns:prefix=“uri”>body</tag> The uri should be unique, so current style is to use a url, e.g., www.ecs.syr.edu. These urls need not be bound to some real site. Attributes do not inherit the namespace of their element, so you need to do this: <tag xmlns:a=“uri” a:myAttrib=“value”>body</tag> Namespaces are used to distinguish different elements that happen to have the same tag name.

Example <?xml version=“1.0” ?> <!-- XML test case --> <LectureNote course=“cse681”> <title>XML Example #1</title> <reference> <title>Programming Microsoft .Net</title> <author> Jeff Prosise <note company=“Wintellect”></note> </author> <publisher>Microsoft Press</publisher> <date>2002</date> <page>608</page> </reference> <comment>Description of PCDATA</comment> </LectureNote> LectureNote.xml Webmonkey | Reference: Special Characters Note: we can have both text and child nodes in the payload of an element.

XML Element Node Structure

XML Parse Tree

XML Presentation There are several ways XML data can be presented to a user: XML data island in an HTML page, interpreted by script XML file interpreted by script in an HTML page XML island or file bound to an HTML table XML styled with an XSL style sheet Essentially, the XSL sheet creates viewable HTML Read, interpreted, and modified by an application The .Net System.XML library provides very effective support for this. You will find more detail in: CSE681\Presentations\XmlPlus.ppt