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.

Slides:



Advertisements
Similar presentations
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.
Advertisements

3 November 2008CIS 340 # 1 Topics To define XML as a technology To place XML in the context of system architectures.
Tutorial 9 Working with XHTML
CS 898N – Advanced World Wide Web Technologies Lecture 21: XML Chin-Chih Chang
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 Introduction What is XML –XML is the eXtensible Markup Language –Became a W3C Recommendation in 1998 –Tag-based syntax, like HTML –You get to make.
Tutorial 11 Creating XML Document
XML Primer. 2 History: SGML vs. HTML vs. XML SGML (1960) XML(1996) HTML(1990) XHTML(2000)
Introduction to XML: Yong Choi CSU Bakersfield.
Upgrading to XHTML DECO 3001 Tutorial 1 – Part 1 Presented by Ji Soo Yoon 19 February 2004 Slides adopted from
5-1 Facilitating Business over the Internet: The XML language CR (2004) Prentice Hall, Inc. The xml goals The main objects of xml: Diagrams: Blocks and.
Developing a Basic Web Page with HTML
Introducing XHTML: Module B: HTML to XHTML. Goals Understand how XHTML evolved as a language for Web delivery Understand the importance of DTDs Understand.
Introducing HTML & XHTML:. Goals  Understand hyperlinking  Understand how tags are formed and used.  Understand HTML as a markup language  Understand.
Chapter 12 Creating and Using XML Documents HTML5 AND CSS Seventh Edition.
XP New Perspectives on XML Tutorial 3 1 DTD Tutorial – Carey ISBN
XML introduction to Ahmed I. Deeb Dr. Anwar Mousa  presenter  instructor University Of Palestine-2009.
XP The University of Akron Summit College Business Technology Department Computer Information Systems 2440: 140 Internet Tools Instructor: Enoch E. Damson.
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.
XML and XSL Institutional Web Management 2001: Organising Chaos.
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.
Introduction to XML Eugenia Fernandez IUPUI. What is XML? From the World Wide Web Consortium (W3C) The Extensible Markup Language (XML) is the universal.
1 © Netskills Quality Internet Training, University of Newcastle Introducing XML © Netskills, Quality Internet Training University.
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.
XHTML. Introduction to XHTML What Is XHTML? – XHTML stands for EXtensible HyperText Markup Language – XHTML is almost identical to HTML 4.01 – XHTML is.
XP 1 DECLARING A DTD A DTD can be used to: –Ensure all required elements are present in the document –Prevent undefined elements from being used –Enforce.
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 Tutorial 13 Validating Documents with DTDs Working with Document Type Definitions.
1 Chapter 10: XML What is XML What is XML Basic Components of XML Basic Components of XML XPath XPath XQuery XQuery.
XP Tutorial 9 1 Working with XHTML. XP SGML 2 Standard Generalized Markup Language (SGML) A standard for specifying markup languages. Large, complex standard.
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.
XP 2 HTML Tutorial 1: Developing a Basic Web Page.
CP3024 Lecture 9 XML: Extensible Markup Language.
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.
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.
1 Credits Prepared by: Rajendra P. Srivastava Ernst & Young Professor University of Kansas Sponsored by: Ernst & Young, LLP (August 2005) XBRL Module Part.
McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Understanding How XML Works Ellen Pearlman Eileen Mullin Programming the.
XML Introduction. What is XML? XML stands for eXtensible Markup Language XML stands for eXtensible Markup Language XML is a markup language much like.
XML Introduction. Markup Language A markup language must specify What markup is allowed What markup is required How markup is to be distinguished from.
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.
INFSY 547: WEB-Based Technologies Gayle J Yaverbaum, PhD Professor of Information Systems Penn State Harrisburg.
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.
XML DTD. XML Validation XML with correct syntax is "Well Formed" XML. XML validated against a DTD is "Valid" XML.
CSS Cascading Style Sheets A very brief introduction CSS, Cascading Style Sheets1.
XP Tutorial 9New Perspectives on HTML and XHTML, Comprehensive 1 Working with XHTML Creating a Well-Formed Valid Document Tutorial 9.
XML Technology. Emerging Importance of XML –HTML-tagging is display oriented. –XML-based content tagging has important uses: data mining role-oriented.
Tutorial 9 Working with XHTML. New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition 2 Objectives Describe the history and theory of XHTML.
XP 2 HTML Tutorial 1: Developing a Basic Web Page.
XP 1 HTML Tutorial 1: Developing a Basic Web Page.
Introduction to XML Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
XP 1 New Perspectives on XML Tutorial 1 – Creating an XML Document Jason C. H. Chen, Ph.D. Professor of MIS School of Business Administration Gonzaga University.
Tutorial 9 Working with XHTML. XP Objectives Describe the history and theory of XHTML Understand the rules for creating valid XHTML documents Apply a.
XP 1Creating Web Pages with XML Tutorial 1 New Perspectives on XML Tutorial 1 – Creating an XML Document.
XML Introduction to XML Extensible Markup Language.
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.
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
XML QUESTIONS AND ANSWERS
Creating an XML Document
Presentation transcript:

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 must be easy to write programs that process XML documents 5.The number of optional features in XML must be kept to a minimum, ideally zero

XML Design Goals Continued 6.XML documents should be clear and easily understood by nonprogrammers 7.The XML design should be prepared quickly 8.The design of XML must be exact and concise 9.XML documents must be easy to create 10.Terseness in XML markup is of minimum importance

XML Vocabularies

Well-Formed and Valid XML Documents An XML document is well-formed if it contains no syntax errors and fulfills all of the specifications for XML code as defined by the W3C. An XML document is valid if it is well-formed and also satisfies the rules laid out in the DTD or schema attached to the document.

The Structure of an XML Document XML documents consist of three parts – The prolog – The document body – The epilog The prolog is optional and provides information about the document itself

The Structure of an XML Document The document body contains the document’s content in a hierarchical tree structure. The epilog is also optional and contains any final comments or processing instructions.

The Structure of an XML Document: Creating the Prolog The prolog consists of four parts in the following order: – XML declaration – Miscellaneous statements or comments – Processing instructions – Document type declaration

The Structure of an XML Document: The XML Declaration The XML declaration is always the first line of code in an XML document. It tells the processor what follows is written using XML. It can also provide any information about how the parser should interpret the code. The complete syntax is: A sample declaration might look like this:

The Structure of an XML Document: Inserting Comments Comments or miscellaneous statements go after the declaration. Comments may appear anywhere after the declaration. The syntax for comments is: This is the same syntax for HTML comments

Elements Elements are the basic building blocks of XML files. Elements contain an opening tag and a closing tag – Content is stored between tags

Elements A closed element, has the following syntax: Content Example: Miles Davis

Element Element names are case sensitive Elements can be nested, as follows: Kind of Blue So What ((:22) Blue in Green (5:37)

Elements Nested elements are called child elements. Elements must be nested correctly. Child elements must be enclosed within their parent elements.

Elements and Attributes All elements must be nested within a single document or root element. There can be only one root element. An open or empty element is an element that contains no content. They can be used to mark sections of the document for the XML parser.

Working with Attributes An attribute is a feature or characteristic of an element. Attributes are text strings and must be placed in single or double quotes. The syntax is: …

Elements and Attributes: Adding elements to the Jazz.XML File This figure shows the revised document document elements {

Character References Special characters, such as the symbol for the British pound, can be inserted into your XML document by using a character reference. The syntax is: &#nnn;

Character References Character is a character reference number or name from the ISO/IEC character set. Character references in XML are the same as in HTML.

Character References This figure shows commonly used character reference numbers

Character References This figure shows the revised Jazz.XML file character reference

Parsed Character Data Parsed character data, or pcdata consists of all those characters that XML treats as parts of the code of XML document – The XML declaration – The opening and closing tags of an element – Empty element tags – Character or entity references – Comments

CDATA Sections A CDATA section is a large block of text the XML processor will interpret only as text. The syntax to create a CDATA section is: <! [CDATA [ Text Block ] ]>

CDATA Sections In this example, a CDATA section stores several HTML tags within an element named HTMLCODE: <![CDATA[ The Jazz Warehouse Your Online Store for Jazz Music ] ]>

CDATA Sections This figure shows the revised Jazz.XML file CDATA section

Parsing an XML Document

Displaying an XML Document in a Web Browser

Linking to a Style Sheet Link the XML document to a style sheet to format the document. The XML processor will combine the style sheet with the XML document and apply any formatting codes defined in the style sheet to display a formatted document. There are two main style sheet languages used with XML: – Cascading Style Sheets (CSS) and Extensible Style Sheets (XSL)

Linking to a Style Sheet There are some important benefits to using style sheets: – By separating content from format, you can concentrate on the appearance of the document – Different style sheets can be applied to the same XML document – Any style sheet changes will be automatically reflected in any Web page based upon the style sheet

Applying a Style to an Element To apply a style sheet to a document, use the following syntax: selector {attribute1:value1; attribute2:value2; …} selector is an element (or set of elements) from the XML document. attribute and value are the style attributes and attribute values to be applied to the document.

Applying a Style to an Element For example: artist {color:red; font-weight:bold} will display the text of the artist element in a red boldface type.

Creating Processing Instructions The link from the XML document to a style sheet is created using a processing statement. A processing instruction is a command that gives instructions to the XML parser.

Creating Processing Instructions For example: Style is the type of style sheet to access and sheet is the name and location of the style sheet.

The JW.css Style Sheet This figure shows the cascading style sheet stored in the jw.css file

Linking to the JW.css Style Sheet This figure shows how to link the JW.css style sheet to the Jazz.xml file processing instruction to access the jw.css style sheet

The jazz.xml Document Formatted with the jw.css Style Sheet This figure shows the formatted jazz.xml file