© De Montfort University, 20011 XML – a meta language Howell Istance and Peter Norris School of Computing De Montfort University.

Slides:



Advertisements
Similar presentations
Chapter 7 An Introduction to XML.
Advertisements

CSCI N241: Fundamentals of Web Design Copyright ©2004 Department of Computer & Information Science Introducing XHTML: Module B: HTML to XHTML.
Defining XML The Document Type Definition. Document Type Definition text syntax for defining –elements of XML –attributes (and possibly default values)
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.
XML and Enterprise Computing. What is XML? Stands for “Extensible Markup Language” –similar to SGML and HTML –document “tags” are used to define content.
XML 6.3 DTD 6. XML and DTDs A DTD (Document Type Definition) describes the structure of one or more XML documents. Specifically, a DTD describes:  Elements.
Extensible Markup Language Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University.
XML(EXtensible Markup Language). XML XML stands for EXtensible Markup Language. XML is a markup language much like HTML. XML was designed to describe.
Tutorial 11 Creating XML Document
COS 381 Day 14. Agenda Questions?? Resources Source Code Available for examples in Text Book in Blackboard
Document Type Definitions. XML and DTDs A DTD (Document Type Definition) describes the structure of one or more XML documents. Specifically, a DTD describes:
Introducing XHTML: Module B: HTML to XHTML. Goals Understand how XHTML evolved as a language for Web delivery Understand the importance of DTDs Understand.
Introduction to XML This material is based heavily on the tutorial by the same name at
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.
Validating DOCUMENTS with DTDs
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.
XML - DTD. The building blocks of XML documents Elements, Tags, Attributes, Entities, PCDATA, and CDATA.
XML What is XML? XML v.s. HTML XML Components Well-formed and Valid Document Type Definition (DTD) Extensible Style Language (XSL) SAX and DOM.
XML – 1h. XML: Contents What is XML? What is “Well Formed” XML? What is “Valid” XML? –Document Type Definitions –Scalable Vector Graphics (SVG) XML in.
1 herbert van de sompel CS 502 Computing Methods for Digital Libraries Cornell University – Computer Science Herbert Van de Sompel
1 © Netskills Quality Internet Training, University of Newcastle Introducing XML © Netskills, Quality Internet Training University.
XML 1 Enterprise Applications CE00465-M XML. 2 Enterprise Applications CE00465-M XML Overview Extensible Mark-up Language (XML) is a meta-language that.
XML Extensible Markup Language. What is XML? ● meta-markup language ● a language for defining a family of languages ● semantic/structured mark-up language.
XML Syntax - Writing XML and Designing DTD's
XML Extensible Markup Language. What is XML? An infrastructure for describing text and data Developed by W3C(the World Wide Web Consortium)
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.
Avoid using attributes? Some of the problems using attributes: Attributes cannot contain multiple values (child elements can) Attributes are not easily.
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.
XML 2nd EDITION Tutorial 1 Creating An Xml Document.
XML - DTD Week 4 Anthony Borquez. What can XML do? provides an application independent way of sharing data. independent groups of people can agree to.
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.
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 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.
An Introduction to XML Sandeep Bhattaram
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.
Introduction to XML February 07, From HTML to XML As mentioned in previous classes, if you know HTML, then you already know XML… really! In this.
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.
Well Formed XML The basics. A Simple XML Document Smith Alice.
What is XML? eXtensible Markup Language eXtensible Markup Language A subset of SGML (Standard Generalized Markup Language) A subset of SGML (Standard Generalized.
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.
XP Tutorial 9New Perspectives on HTML and XHTML, Comprehensive 1 Working with XHTML Creating a Well-Formed Valid Document Tutorial 9.
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.
XML Extensible Markup Language
CITA 330 Section 2 DTD. Defining XML Dialects “Well-formedness” is the minimal requirement for an XML document; all XML parsers can check it Any useful.
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.
XML QUESTIONS AND ANSWERS
The XML Language.
Creating an XML Document
Web Programming Maymester 2004
XML Data Introduction, Well-formed XML.
Allyson Falkner Spokane County ISD
Presentation transcript:

© De Montfort University, XML – a meta language Howell Istance and Peter Norris School of Computing De Montfort University

© De Montfort University, Origins of HTML Initial set of tags defined to do a limited job of cross referencing scientific papers Little semantic content in tags, although has meaning in terms of what tag refers to Tag set was small and user community of html grew quickly – html was easy to learn and use

© De Montfort University, HTML Tags in HTML concerned with presentation of data Tags have no semantic meaning: indicates ‘header’ but contents of document could be anything Search engines rely on tag to provide keywords, no means of discerning content from marked up document Definition of tags is not extensible Cascading style sheets provide some separation of content and presentation One of original aims of SGML was complete separation of content and presentation

© De Montfort University, XML (eXtensible Markup Language) Simplified version of SGML, enabling users to define their own language XML is not a tag set, but a meta language Tags not concerned with how to render data, but instead define content –(HTML) indicates that text is bold –(XML) indicates that data is about employees Definition is either implicit (deduced from document structure) or is explicit (defined in Document Type Definition or DTD)

© De Montfort University, Student List Adam yes - final Adrian no Adam yes Adrian no students.html students.xml Specifies presentationSpecifies data structure

© De Montfort University, Student List Adam yes - final Adrian no HTML Document ( good for formatting) What is “yes”? What is “no”? Data and presentation logic mixed

© De Montfort University, Adam yes Adrian no XML Document ( good for describing data) Data is self-describing custom tags describe content (define your own tags) easy to locate data (e.g. all BSC students) Only data

© De Montfort University, xml mark-up Start tag possibly containing attributes and values eg, End tag eg Empty tag eg Document type declaration eg xml declaration eg Comment

© De Montfort University, Elements and trees Elements are house, downstairs and upstairs downstairs and upstairs are the ‘content’ of the element house downstairs and upstairs themselves have no content downstairs and upstairs are child elements of the root element house

© De Montfort University, Xml document Root node nested node list Child node Xml node structure

© De Montfort University, Xml document house downstairs upstairs kitchen Dining_room bathroom bedroom Xml node structure bedroom larder

© De Montfort University, Well formed and valid xml document is ‘well-formed’ if the implicit structure in the document is not ambiguous xml document is ‘valid’ if it conforms to a set of rules which defines what each element is permitted to contain

© De Montfort University, Text nodes The content of elements may be other elements or text The text Rather Gloomy and Brightly lit are each text nodes Rather gloomy Brightly lit

© De Montfort University, Attributes and values Attribute is a means of providing information about an element, has a name (postcode)and a value (“LE1 9BH”) There may be several attributes, all must have unique names, order in which they appear not important Rather gloomy Brightly lit

© De Montfort University, entities << && >> "“ &apos;‘ Sequence of chars which the parser will replace with the symbol shown Note ; to end sequence (x < y) && (y < z)

© De Montfort University, Rules for well formed xml There must be exactly one root element Element start tags must have a matching closing tag Elements may nest but must not overlap Attribute values must be in matching quotes Element may not have two attributes with the same name If present, the xml declaration must begin the document Comments and processing instructions must not appear in tags Element and attribute values must not contain < and & Entities must not be used unless they have been declared

© De Montfort University, Valid xml DTD defines permissible syntax of a document using extended BNF Either Public or System Public – used by the world at large (say in the case of the definition of SMIL) System – used (and found often) on the local system Applications attempting to process an xml document can compare it with the rules and process it only if it is valid

© De Montfort University, Sample dtd #PCDATA – ‘parsed character data’ ie a text node No attributes included Petshow can have one and only 1 child which must be a owner element

© De Montfort University, Occurrence suffixes ? 0 or 1 *0 or more +1 or more x,y,zin this order X|y|zone of these Used to define permissible number of occurrences within DTD

© De Montfort University, Modified DTD showing occurrences

© De Montfort University, Modified DTD showing attributes <!ATTLIST owner ownerIDCDATA #REQUIRED> <!ATTLIST pet petSidCDATA #REQUIRED previousOwner IDREF #IMPLIED>

© De Montfort University, A look at SMIL