1 Extensible Markup Language: XML HTML: portable, widely supported protocol for describing how to format data XML: portable, widely supported protocol.

Slides:



Advertisements
Similar presentations
CSCI N241: Fundamentals of Web Design Copyright ©2004 Department of Computer & Information Science Introducing XHTML: Module B: HTML to XHTML.
Advertisements

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.
3 November 2008CIS 340 # 1 Topics To define XML as a technology To place XML in the context of system architectures.
1 Parsing XML sequence? We have i2xml filter (exercise) – we want xml2i also Don’t have to write XML parser, Python provides one Thus, algorithm: – Open.
1 Extensible Markup Language: XML HTML: portable, widely supported protocol for describing how to format data XML: portable, widely supported protocol.
Sistemi basati su conoscenza XML Prof. M.T. PAZIENZA a.a
1 Extensible Markup Language: XML XML developed by World Wide Consortium’s (W3C’s) XML Working Group (1996) XML portable, widely supported technology for.
1 Extensible Markup Language: XML HTML: widely supported protocol for formatting data XML: widely supported protocol for describing data XML is quickly.
Sistemi basati su conoscenza XML Prof. M.T. PAZIENZA a.a
XML(EXtensible Markup Language). XML XML stands for EXtensible Markup Language. XML is a markup language much like HTML. XML was designed to describe.
XML Primer. 2 History: SGML vs. HTML vs. XML SGML (1960) XML(1996) HTML(1990) XHTML(2000)
Introduction to XML: Yong Choi CSU Bakersfield.
Introduction to XML Rashmi Kukanur. XML XML stands for Extensible Markup Language XML was designed to carry data XML and HTML designed with different.
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.
Introduce of XML Xiaoling Song CS157A. What is XML? XML stands for EXtensible Markup Language XML stands for EXtensible Markup Language XML is a markup.
Tutorial 1: Getting Started with HTML5
Copyright © 2003 Pearson Education, Inc. Slide 2-1 Created by Cheryl M. Hughes, Harvard University Extension School — Cambridge, MA The Web Wizard’s Guide.
Pemrograman Berbasis WEB XML part 2 -Aurelio Rahmadian- Sumber: w3cschools.com.
XML introduction to Ahmed I. Deeb Dr. Anwar Mousa  presenter  instructor University Of Palestine-2009.
CREATED BY ChanoknanChinnanon PanissaraUsanachote
 2003 Prentice Hall, Inc. All rights reserved. Chapter 20 – Extensible Markup Language (XML) Outline 20.1 Introduction 20.2 Structuring Data 20.3 XML.
 2003 Prentice Hall, Inc. All rights reserved. 3 rd Edition Slide 1 Chapter 20 – Extensible Markup Language (XML) Outline 20.1 Introduction 20.2 Structuring.
HTML Structure & syntax
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.
CSCI/CMPE 4341 Topic: Programming in Python Chapter 9: Python XML Processing Xiang Lian The University of Texas – Pan American Edinburg, TX 78539
Session IV Chapter 9 – XML Schemas
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.
Electronic Commerce COMP3210 Session 4: Designing, Building and Evaluating e-Commerce Initiatives – Part II Dr. Paul Walcott Department of Computer Science,
How do I use HTML and XML to present information?.
By Mohsen ashouri.  Introduction  Comparison between XML and HTML  XML Syntax  Challenges  Summary.
Softsmith Infotech XML. Softsmith Infotech XML EXtensible Markup Language XML is a markup language much like HTML Designed to carry data, not to display.
 2004 Prentice Hall, Inc. All rights reserved. Chapter 20 – Extensible Markup Language (XML) Outline 20.1 Introduction 20.2 Structuring Data 20.3 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.
Web Technologies COMP6115 Session 4: Adding a Database to a Web Site Dr. Paul Walcott Department of Computer Science, Mathematics and Physics University.
1 Credits Prepared by: Rajendra P. Srivastava Ernst & Young Professor University of Kansas Sponsored by: Ernst & Young, LLP (August 2005) XBRL Module Part.
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 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.
XML Introduction. Markup Language A markup language must specify What markup is allowed What markup is required How markup is to be distinguished from.
1 Tutorial 11 Creating an XML Document Developing a Document for a Cooking Web Site.
C# and Windows Programming XML Processing. 2 Contents Markup XML DTDs XML Parsers DOM.
1 Dr Alexiei Dingli XML Technologies SAX and DOM.
Unit 10 Schema Data Processing. Key Concepts XML fundamentals XML document format Document declaration XML elements and attributes Parsing Reserved characters.
Introduction to the Document Object Model Eugenia Fernandez IUPUI.
Markup basics. Markup languages add commentary to text files –so that the commentary can be ignored if not understood eg HyperText Markup Language –adds.
Internet & World Wide Web How to Program, 5/e. © by Pearson Education, Inc. All Rights Reserved.2.
Introduction to HTML Year 8. What is HTML O Hyper Text Mark-up Language O The language that all the elements of a web page are written in. O It describes.
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.
Representing data with XML SE-2030 Dr. Mark L. Hornick 1.
Introduction to XML XML – Extensible Markup Language.
XML CSC1310 Fall HTML (TIM BERNERS-LEE) HyperText Markup Language  HTML (HyperText Markup Language): December  Markup  Markup is a symbol.
XML. HTML Before you continue you should have a basic understanding of the following: HTML HTML was designed to display data and to focus on how data.
C Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Introduction to XML Standards.
VCE IT Theory Slideshows by Mark Kelly study design By Mark Kelly, vceit.com, Begin.
XP 1Creating Web Pages with XML Tutorial 1 New Perspectives on XML Tutorial 1 – Creating an XML Document.
Introduction to the Document Object Model
The XML Language.
DOM Document Object Model.
XML Data Introduction, Well-formed XML.
Chapter 20 – Extensible Markup Language (XML)
XML.
What is XML?.
14 XML.
Extensible Markup Language (XML)
Presentation transcript:

1 Extensible Markup Language: XML HTML: portable, widely supported protocol for describing how to format data XML: portable, widely supported protocol for describing data XML is quickly becoming standard for data exchange between applications

1 XML Documents XML marks up data using tags, which are names enclosed in angle brackets All tags appear in pairs:.. Elements: units of data (i.e., anything between a start tag and its corresponding end tag) Root element contains all other document elements Tag pairs cannot appear interleaved: Must be: Nested elements form trees What defines an XML document is not its tag names but that it has tags that are formatted in this way.

Root element contains all other document elements Optional XML declaration includes version information parameter (MUST be very first line of file) Because of the nice.. structure, the data can be viewed as organized in a tree: article titledateauthor summarycontent firstNamelastName

dna Aspergillus awamori U03518 aacctgcggaaggatcattaccgagtgcgggtcctttgggccca acctcccatccgtgtctattgtaccctgttgcttcgg cgggcccgccgcttgtcggccgccgggggggcgcctctg ccccccgggcccgtgcccgccggagaccccaacacgaac actgtctgaaagcgtgcagtctgagttgattgaatgcaat cagttaaaactttcaacaatggatctcttggttccggc An I-sequence might be structured as XML like this.. SEQUENCEDATA TYPE SEQ DATA IDNAME comment

1 Parsing and displaying XML XML is just another data format We need to write yet another parser No more filters, please! ? No! XML is becoming standard Many different systems can read XML – not many systems can read our I-sequence format.. Thus, parsers exist already

1 XML document opened in Internet Explorer Minus sign Each parent element/node can be expanded and collapsed Plus sign Standard browsers can format XML documents nicely!

1 XML document opened in Mozilla Again: Each parent element/node can be expanded and collapsed (here by pressing the minus, not the element)

Attributes Data can also be placed in attributes: name/value pairs Attribute (name-value pair, value in quotes): element contact has the attribute type which has the value “to” Empty elements are elements with no character data between the tags. The tags of an empty element may be written in one like this: letter.xml

1 Parsers and trees We’ve already seen that XML markup can be displayed as a tree Some XML parsers exploit this. They – parse the file – extract the data – return it organized in a tree data structure called a Document Object Model article titledateauthor summarycontent firstNamelastName

1 Document Object Model (DOM) a DOM parser retrieves data from XML document returns tree structure called a DOM tree Each component of an XML document represented as a tree node Single root node (the document node) contains all other nodes

1 Python provides a DOM parser! All nodes have name (of tag) and value (data) Text (including whitespace) represented in nodes with tag name #text article title #text date author summary content #text firstName #text lastName #text Simple XML #text Dec #text XML.. easy. #text In this..XML. #text John #text Doe

fig16_04revised.py Parse XML document and load data into variable document documentElement attribute refers to root node nodeName refers to element’s tag name Various node attributes: firstChild nextSibling nodeValue parentNode NB: Changes since book!

1 Program output The first child of root element is: #text whose next sibling is: title Text inside "title" tag is Simple XML Parent node of title is: article Here is the root element of the document: article The following are its child elements: #text title #text date #text author #text summary #text content #text article title #text date author summary content #text firstName #text lastName #text Simple XML #text Dec #text XML.. easy. #text In this..XML. #text John #text Doe

1 Summary XML is widely used Many applications can read XML Python already has an XML parser which returns a tree

1.. on to the exercises