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.

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

History Leading to XHTML
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.
Creating a Well-Formed Valid Document. 2 Objectives Introducing XHTML Creating a Well-Formed Document Creating a Valid Document Creating an XHTML Document.
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)
Upgrading to XHTML DECO 3001 Tutorial 1 – Part 1 Presented by Ji Soo Yoon 19 February 2004 Slides adopted from
Introducing XHTML: Module B: HTML to XHTML. Goals Understand how XHTML evolved as a language for Web delivery Understand the importance of DTDs Understand.
Copyright © 2003 Pearson Education, Inc. Slide 2-1 Created by Cheryl M. Hughes, Harvard University Extension School — Cambridge, MA The Web Wizard’s Guide.
XP Tutorial 9New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Working with XHTML Creating a Well-Formed Valid Document Tutorial 9.
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.
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.
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.
XML Syntax - Writing XML and Designing DTD's
XHTML. Introduction to XHTML What Is XHTML? – XHTML stands for EXtensible HyperText Markup Language – XHTML is almost identical to HTML 4.01 – XHTML is.
These Questions are copied from
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
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.
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.
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.
17 Apr 2002 XML Syntax: Documents Andy Clark. Basic Document Structure Element tags – Elements have associated attributes Text content Miscellaneous –
Lecture 16 Introduction to XML Boriana Koleva Room: C54
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.
The eXtensible Markup Language (XML). Presentation Outline Part 1: The basics of creating an XML document Part 2: Developing constraints for a well formed.
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.
1 Tutorial 11 Creating an XML Document Developing a Document for a Cooking Web Site.
1 herbert van de sompel CS 502 Computing Methods for Digital Libraries Cornell University – Computer Science Herbert Van de Sompel
Well Formed XML The basics. A Simple XML Document Smith Alice.
Introduction to DTD A Document Type Definition (DTD) defines the legal building blocks of an XML document. It defines the document structure with a list.
XML CSC1310 Fall HTML (TIM BERNERS-LEE) HyperText Markup Language  HTML (HyperText Markup Language): December  Markup  Markup is a symbol.
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.
XML CORE CSC1310 Fall XML DOCUMENT XML document XML document is a convenient way for parsers to archive data. In other words, it is a way to describe.
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.
Extensible Markup Language (XML) Pat Morin COMP 2405.
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.
Creating a Well-Formed Valid Document
Tutorial 9 Working with XHTML
Tutorial 9 Working with XHTML
Creating an XML Document
Tutorial 9 Working with XHTML
Allyson Falkner Spokane County ISD
Document Type Definition (DTD)
Review of XML IST 421 Spring 2004 Lecture 5.
Presentation transcript:

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 vocabularies.

2 CML: An XML Example

3 GolfML: Another XML Example …

4 Why is XML Important? XML gives us a way to create and maintain structured documents in plain text that can be rendered in a variety of different ways. A primary objective of XML is to completely separate content from presentation. Example: The Asbury Park Press is a structured document containing pages, columns, etc. The news is just plain text (including the images). Newspapers can be rendered on paper or online.

5 Where XML Fits into Other Markup Languages

6 DTDs and XML Documents A DTD (Document Type Definition) or schema specifies the rules for what a legal XML document may contain. 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.

7 The Structure of an XML Document: The Prolog The XML declaration is always the first line of code in an XML document. It tells the parser what follows is written using XML. The complete syntax is: <?xml version=“version number” encoding=“encoding type” standalone=“yes | no” ?> The typical declaration is: <?xml version=“1.0” encoding=“UTF-8” standalone = “yes” ?>

8 Closed elements have the following syntax: Content For example: Miles Davis Open elements have the syntax: For example: Element names are case sensitive, must begin with a letter (or _), and may not contain spaces. Elements can be (properly) nested. For example: So What Blue in Green All elements must be nested within a single root element. Comments are enclosed in (like HTML). The Structure of an XML Document: Elements

9 An attribute is a property of an element. They are text strings placed in single or double quotes. The syntax is: The Structure of an XML Document: Attributes

The Element Hierarchy 10

11 Special Character References Special symbols can be inserted into an XML document using either the character reference or entity reference,

12 CDATA Sections Validators can get confused by some XML: > 100 degrees You must separate the file into PCDATA and CDATA. Parsed character data (PCDATA) is text to be parsed by a browser or parser (all the XML code: declarations, elements, attributes, comments). Unparsed character data (CDATA) is text not to be processed by the browser or parser. A CDATA section marks a block of text as CDATA so that parsers ignore any text within it: <![CDATA[ > 100 degrees ]]>

13 Mark Your XML with the Sections You Don’t Want Parsed CDATA section

14 Parsing an XML Document

15 Displaying an XML Document in a Web Browser If it’s well-formed If it’s not well-formed

16 Linking to a Style Sheet

17 Applying Styles to the XML Elements To apply a style sheet to a document, use the syntax: selector {attribute1:value1; attribute2:value2; …} For example: artist {color:red; font-weight:bold}

18 Linking the XML to the Style Sheet 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.

19 The XML Document Formatted with the Style Sheet