Representing data with XML SE-2030 Dr. Mark L. Hornick 1.

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.
CM143 - Web Week 2 Basic HTML. Links and Image Tags.
The Information School at the University of Washington LIS 549 U/TU: Intro to Content Management Fall 2003 * Bob Boiko * MSIM Associate Chair XML Schemas.
Introducing XHTML: Module B: HTML to XHTML. Goals Understand how XHTML evolved as a language for Web delivery Understand the importance of DTDs Understand.
Jennifer Widom XML Data XML Schema. Jennifer Widom XML Schema “Valid” XML Adheres to basic structural requirements  Also adheres to content-specific.
Introduction to XML This material is based heavily on the tutorial by the same name at
Chapter 12 Creating and Using XML Documents HTML5 AND CSS Seventh Edition.
Pemrograman Berbasis WEB XML part 2 -Aurelio Rahmadian- Sumber: w3cschools.com.
Introduction to XML cs3505. References –I got most of this presentation from this site –O’reilly tutorials.
Why XML ? Problems with HTML HTML design - HTML is intended for presentation of information as Web pages. - HTML contains a fixed set of markup tags. This.
CREATED BY ChanoknanChinnanon PanissaraUsanachote
1Computer Sciences Department Princess Nourah bint Abdulrahman University.
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.
XHTML. Introduction to XHTML What Is XHTML? – XHTML stands for EXtensible HyperText Markup Language – XHTML is almost identical to HTML 4.01 – XHTML is.
Tutorial 1: XML Creating an XML Document. 2 Introducing XML XML stands for Extensible Markup Language. A markup language specifies the structure and content.
XML TUTORIAL Portions from w3 schools By Dr. John Abraham.
Avoid using attributes? Some of the problems using attributes: Attributes cannot contain multiple values (child elements can) Attributes are not easily.
XML A web enabled data description language 4/22/2001 By Mark Lawson & Edward Ryan L’Herault.
JSTL, XML and XSLT An introduction to JSP Standard Tag Library and XML/XSLT transformation for Web layout.
XML and Digital Libraries M. Zubair Department of Computer Science Old Dominion University.
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.
Windows Presentation Foundation (WPF) Chapter 16 Dr. Abraham.
XP 1 New Perspectives on XML Binding XML Data with Internet Explorer.
An OO schema language for XML SOX W3C Note 30 July 1999.
XP 1 Creating an XML Document Developing an XML Document for the Jazz Warehouse XML Tutorial.
HTML ( HYPER TEXT MARK UP LANGUAGE ). What is HTML HTML describes the content and format of web pages using tags. Ex. Title Tag: A title It’s the job.
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.
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.
Lecture: Web Design Assis. Prof. Freshta Hanif Ehsan Faculty of Computer Science Kabul Polytechnic University Spring Semester
1 Tutorial 11 Creating an XML Document Developing a Document for a Cooking Web Site.
1 Tutorial 14 Validating Documents with Schemas Exploring the XML Schema Vocabulary.
Jennifer Widom XML Data Introduction, Well-formed XML.
CS 157B: Database Management Systems II February 11 Class Meeting Department of Computer Science San Jose State University Spring 2013 Instructor: Ron.
Internet & World Wide Web How to Program, 5/e. © by Pearson Education, Inc. All Rights Reserved.2.
COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 4 1COMP9321, 15s2, Week.
Web Technologies Lecture 4 XML and XHTML. XML Extensible Markup Language Set of rules for encoding a document in a format readable – By humans, and –
XML CSC1310 Fall HTML (TIM BERNERS-LEE) HyperText Markup Language  HTML (HyperText Markup Language): December  Markup  Markup is a symbol.
XML The Extensible Markup Language (XML ), which is comparable to SGML and modeled on it, describes how to describe a collection of data. A standard way.
Creating Your 1 st Web Page. Tags Refers to anything between on a webpage Most appear in pairs surrounding content Some appear as empty tags (no closing.
 XML derives its strength from a variety of supporting technologies.  Structure and data types: When using XML to exchange data among clients, partners,
Introduction to XML Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
HTML. INDEX Introduction to HTML Creating Web Pages Commands And Tags Web Page.
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 & JSON. Background XML and JSON are to standard, textual data formats for representing arbitrary data – XML stands for “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.
Creating Groups of Elements and Attributes in an XML Schema ©NIITeXtensible Markup Language/Lesson 4/Slide 1 of 28 Objectives In this lesson, you will.
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.
The Object-Oriented Thought Process Chapter 11
XML QUESTIONS AND ANSWERS
Introduction to XHTML.
Eugenia Fernandez IUPUI
The Document Object Model
Creating an XML Document
Web Programming Maymester 2004
XML Data Introduction, Well-formed XML.
Asynchronous Javascript And XML
XML Data DTDs, IDs & IDREFs.
CS 240 – Advanced Programming Concepts
Pertemuan 1 Desain web Pertemuan 1
The Most Basic HTML Page
Presentation transcript:

Representing data with XML SE-2030 Dr. Mark L. Hornick 1

XML: EXtensible Markup Language XML is a technology for defining markup languages to represent data designed to define structured data descriptions that are Extensible/customizable Portable across languages, Portable across operating system platforms SE-2030 Dr. Mark L. Hornick 2

3 XML allows you to define your own markup language You can define your own tags Tag vocabulary XML can use an optional DTD (Document Type Definition) or XSD (XML Schema Defn) to formally describe the data How tags can nest What attributes a tag can/must have i.e. tag grammar Data that is described by a specified vocabulary & grammar is called an XML Application

SE-2030 Dr. Mark L. Hornick 4 HTML is an XML application HTML is a description of data in web page documents, and how it is structured My web page HTML syntax summary or, all you need to know about HTML This is how you write an HTML document. The end.

SE-2030 Dr. Mark L. Hornick 5 XML schemas define how HTML can be structured (for instance, a can appear within a, but not within a ) html h1 head body strong p title p em p strong

SE-2030 Dr. Mark L. Hornick 6 What else is XML good for? XML can be used as a format for storing data in files in a structured manner Separating content from presentation, so that data created by an application written in Java can be read by an application written in C (or Javascript, or any other language)

Scenario Consider a Java collection of Students: List students; where public class Student { String firstname; String lastname; int id; String program; } SE-2030 Dr. Mark L. Hornick 7

In Java, we can use serialization to write/store students to a file, to be read (later) by another Java application Provided the other Java application knows the definition of Student and List It would be much more difficult for a program written in C or JavaScript to read the file Further complications arise when the file is read by an application running on another HW or OS platform SE-2030 Dr. Mark L. Hornick 8

XML allows us to create a document that can be used to represent a portable collection of Students: Bored Bill 1111 SE Bob Sledd 1112 CE SE-2030 Dr. Mark L. Hornick 9 XML grammars (like the one here) represent all data in plain text, which is most easily interpreted across platforms

The XML grammar itself may be defined by an optional XML Schema Definition (or a Document Type Defintion/DTD) SE-2030 Dr. Mark L. Hornick 10 XML Schema Definitions (like the one here) define the valid format of the XML data. For instance the tag specifies that the firstname…program tags MUST appear in only that sequence

Here is another XML document that can be used to represent a portable collection of Students: <student firstname=“Bill” lastname=“Bored” id=“1111” program=“SE” <student firstname=“Bob” lastname=“Sledd” id=“1114” program=“CE” SE-2030 Dr. Mark L. Hornick 11 Note that this grammar defines firstname…program as attributes instead of child elements

The XML Schema Definition for the alternate grammar: SE-2030 Dr. Mark L. Hornick 12

How do you read the data from an XML document? Most languages implement XML Parsers that can interpret an XML file and extract the data XML Parsers can be “told” to use the optional XML Schema to ensure that the XML file being parsed is in a valid format Validation is optional; you can create XML files without creating an XML Schema, but then you have no way of constraining the syntax SE-2030 Dr. Mark L. Hornick 13

XML Parser Demonstration SE-2030 Dr. Mark L. Hornick 14