XML: text format Dr Andy Evans. Text-based data formats As data space has become cheaper, people have moved away from binary data formats. Text easier.

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

CSCI N241: Fundamentals of Web Design Copyright ©2004 Department of Computer & Information Science Introducing XHTML: Module B: HTML to XHTML.
LIS650lecture 1 XHTML 1.0 strict Thomas Krichel
XML I.
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.
An Introduction to XML Based on the W3C XML Recommendations.
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.
History Leading to XHTML
XML Document Type Definitions ( DTD ). 1.Introduction to DTD An XML document may have an optional DTD, which defines the document’s grammar. Since the.
Extensible Markup Language Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University.
CS 898N – Advanced World Wide Web Technologies Lecture 21: XML Chin-Chih Chang
Document Type Definitions
31 Signs That Technology Has Taken Over Your Life: #6. When you go into a computer store, you eavesdrop on a salesperson talking with customers -- and.
Chapter 10 © 2001 by Addison Wesley Longman, Inc. 1 Chapter 10 Sebesta: Programming the World Wide Web.
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
Document Type Definitions. XML and DTDs A DTD (Document Type Definition) describes the structure of one or more XML documents. Specifically, a DTD describes:
Programming for Geographical Information Analysis: Advanced Skills Lecture 6: XML Dr Andy Evans.
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
Introducing HTML & XHTML:. Goals  Understand hyperlinking  Understand how tags are formed and used.  Understand HTML as a markup language  Understand.
Topics The "bigger picture" –The "XML sales pitch" –XML/XHTML vs. SGML/HTML –XML in electronic publishing –XML and the future, web 2.0 XML basics: –Building.
XML introduction to Ahmed I. Deeb Dr. Anwar Mousa  presenter  instructor University Of Palestine-2009.
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.
Introduction to XML cs3505. References –I got most of this presentation from this site –O’reilly tutorials.
XML eXtensible Markup Language by Darrell Payne. Experience Logicon / Sterling Federal C, C++, JavaScript/Jscript, Shell Script, Perl XML Training XML.
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.
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.
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.
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.
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
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.
XML Introduction. What is XML? XML stands for eXtensible Markup Language XML stands for eXtensible Markup Language XML is a markup language much like.
1 Dr Alexiei Dingli XML Technologies DTD. 2 Document Type Definition Defines –the legal building blocks of an XML document –the document structure –The.
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.
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.
When we create.rtf document apart from saving the actual info the tool saves additional info like start of a paragraph, bold, size of the font.. Etc. This.
What is XML? eXtensible Markup Language eXtensible Markup Language A subset of SGML (Standard Generalized Markup Language) A subset of SGML (Standard Generalized.
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.
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved Chapter 7 Representing Web Data:
XML Introduction to 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.
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
Creating a Well-Formed Valid Document
XML QUESTIONS AND ANSWERS
CSV Classic format Comma Separated Variables (CSV). Easily parsed.
The XML Language.
CSCE 315 – Programming Studio Spring 2013
Chapter 7 Representing Web Data: XML
Creating an XML Document
Introducing HTML & XHTML:
CS 240 – Advanced Programming Concepts
Allyson Falkner Spokane County ISD
Presentation transcript:

XML: text format Dr Andy Evans

Text-based data formats As data space has become cheaper, people have moved away from binary data formats. Text easier to understand for humans / coders. Move to open data formats encourages text. Text based on international standards so easier to transfer between software.

CSV Classic format Comma Separated Variables (CSV). Easily parsed (see Core course). No information added by structure, so an ontology (in this case meaning a structured knowledge framework) must be externally imposed. 10,10,50,50,10 10,50,50,10,10 25,25,75,75,25 25,75,75,25,25 50,50,100,100,50 50,100,100,50,50

JSON (JavaScript Object Notation) Increasing popular light- weight data format. Text attribute and value pairs. Values can include more complex objects made up of further attribute-value pairs. Easily parsed. Small(ish) files. Limited structuring opportunities. { "type": "FeatureCollection", "features": [ { "type": "Feature", "geometry": { "type": "Point", "coordinates": [42.0, 21.0] }, "properties": { "prop0": "value0" } }] } GeoJSON example

Markup languages Tags and content. Tags often note the ontological context of the data, making the value have meaning: that is determining its semantic content. All based on Standard Generalized Markup Language (SGML) [ISO 8879]

HTML Hypertext Markup Language Nested tags giving information about the content. This is text Note that tags can be on their own, some by default, some through sloppiness. Not case sensitive. Contains style information (though use discouraged).

XML eXtensible Markup Language More generic. Extensible – not fixed terms, but terms you can add to. Vast number of different versions for different kinds of information. Used a lot now because of the advantages of using human- readable data formats. Data transfer fast, memory cheap, and it is therefore now feasible.

GML Major geographical type is GML (Geographical Markup Language). Given a significant boost by the shift of Ordnance Survey from their own binary data format to this. Controlled by the Open GIS Consortium: , 88.56

Simple example (Slightly simpler than GML) 100, , , , ,100

Text As some symbols are used, need to use & < > " for ampersand,, " CDATA blocks can be used to literally present text that otherwise might seem to be markup: this]]>

Simple example 100, , , , ,100 Prolog: XML declaration (version) and text character set Tag name-value attributes

Well Formedness XML checked for well-formedness. Most tags have to be closed – you can’t be as sloppy as with HTML. “Empty” tags not enclosing look like this: or. Case-sensitive.

Document Object Model (DOM) One advantage of forcing good structure is we can treat the XML as a tree of data. Each element is a child of some parent. Document has a root. Map Polygon id= p1 100,100200,100200,200 Polygon id = p2 0, 1010,1010,0

Schema As well as checking for well-formedness we can check whether a document is valid against a schema : definition of the specific XML type. There are two popular schema types in XML: (older) DTD (Document Type Definition) (newer) XSD (XML Schema Definition) XSD more complex, but in XML itself – only need one parser. In a separate text file, linked by a URI (URL or relative file location).

DTD DTD for the example: "map"s may contain zero or more "polygon"s; "polygon"s must have one set of "points", and can also have an "attribute" "id". Points must be in text form. For dealing with whitespace, see XML Specification.

Linking to DTD 100, , , , ,100 Put XML and DTD files in a directory and open the XML in a web browser, and the browser will check the XML. Root element

XSD

XSD Includes information on the namespace: a unique identifier (like Allows us to distinguish our XML tag "polygon" from any other "polygon" XML tag.

Linking to XSD <map xmlns:xsi=" xsi:schemaLocation=" map2.xsd" > 100, , , , ,100 Note server URL and relative file location – could just be a URL.