Web Technologies COMP6115 Session 4: Adding a Database to a Web Site Dr. Paul Walcott Department of Computer Science, Mathematics and Physics University.

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.
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 XML.
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.
Sistemi basati su conoscenza XML Prof. M.T. PAZIENZA a.a
Extensible Markup Language XML MIS 520 – Database Theory Fall 2001 (Day) Lecture 14.
XML Parser. Why Need a XML Parser ? Check XML syntax. ( is well-formed ? ) Validation. ( DTD and XML Schema ) Allow programmatic access to the document’s.
Java API for XML Processing (JAXP) CSE 4/586: Distributed Systems Department of Computer Science and Engineering University at Buffalo, New York Jia Zhao.
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 Extensible Markup Language
Introduction to XML Extensible Markup Language Carol Wolf Computer Science Department.
Chapter 13 XML Concept of XML Simple Example of XML XML vs. HTML in Syntax XML Structure DTD and CDATA Sections Concept of SAX Processing Download and.
ECA 228 Internet/Intranet Design I Intro to XML. ECA 228 Internet/Intranet Design I HTML markup language very loose standards browsers adjust for non-standard.
XML introduction to Ahmed I. Deeb Dr. Anwar Mousa  presenter  instructor University Of Palestine-2009.
Web Technologies COMP6115 Session 2: Planning, Designing, Constructing and Testing Static Web Sites Dr. Paul Walcott Department of Computer Science, Mathematics.
XML Anisha K J Jerrin Thomas. Outline  Introduction  Structure of an XML Page  Well-formed & Valid XML Documents  DTD – Elements, Attributes, Entities.
What is XML? XML stands for EXtensible Markup Language
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.
CREATED BY ChanoknanChinnanon PanissaraUsanachote
XML Technologies Surekha Akula
E0262 – MIS – Multimedia Storage Techniques XML (Extensible Markup Language)  XML is a markup language for creating documents containing structured information.
Introduction to XML 1. XML XML started out as a standard data exchange format for the Web Yet, it has quickly become the fundamental instrument in the.
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? An infrastructure for describing text and data Developed by W3C(the World Wide Web Consortium)
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.
These Questions are copied from
Introduction to XML Extensible Markup Language. What is XML XML stands for eXtensible Markup Language. A markup language is used to provide information.
 XML is designed to describe data and to focus on what data is. HTML is designed to display data and to focus on how data looks.  XML is created to structure,
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.
Electronic Commerce COMP3210 Session 4: Designing, Building and Evaluating e-Commerce Initiatives – Part II Dr. Paul Walcott Department of Computer Science,
Web Technologies COMP6115 Session 4: Adding a Database to a Web Site Dr. Paul Walcott Department of Computer Science, Mathematics and Physics University.
XML Extensible Markup Language
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.
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.
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.
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.
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 for Text Markup An introduction to XML markup.
An Introduction to XML Paul Donohue May 8th 2002 Hotel Senator Zürich.
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.
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.
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.
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.
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved Chapter 7 Representing Web Data:
XP 1Creating Web Pages with XML Tutorial 1 New Perspectives on XML Tutorial 1 – Creating an XML Document.
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 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 Technologies and Related Applications
14 XML.
Review of XML IST 421 Spring 2004 Lecture 5.
Presentation transcript:

Web Technologies COMP6115 Session 4: Adding a Database to a Web Site Dr. Paul Walcott Department of Computer Science, Mathematics and Physics University of the West Indies, Cave Hill Campus Barbados 14/12/06 © 2006/2007 Dr. Paul Walcott

XML 2 Extensible Markup Language (or XML) is another markup language Extensible Markup Language (or XML) is another markup language XML is a subset of SGML (Standard Generalised Markup Language) XML is a subset of SGML (Standard Generalised Markup Language) –SGML is a meta language used to create other languages, e.g. XML and HTML The purpose of XML is different from HTML The purpose of XML is different from HTML

XML describe data in a structured way and is used to define other markup languages XML describe data in a structured way and is used to define other markup languages XML allows the creation of custom tags (unlike HTML whose tags are predefined) XML allows the creation of custom tags (unlike HTML whose tags are predefined) XML uses a DTD to describe the data XML uses a DTD to describe the data Several XML standards have been defined, for example to markup mathematical formula, and chemical molecular structures Several XML standards have been defined, for example to markup mathematical formula, and chemical molecular structures XML Cont’d

The main difference between XML and HTML are: 1 The main difference between XML and HTML are: 1 –XML was designed to carry data –HTML is about displaying information, while XML is about describing information –XML is not a replacement for HTML XML Cont’d

XML and HTML were designed with different goals: XML and HTML were designed with different goals: –XML was designed to describe data and to focus on what data is. –HTML was designed to display data and to focus on how data looks. XML Cont’d

XML Document Structure 2 XML documents are typically stored in text files with a.xml extension XML documents are typically stored in text files with a.xml extension An XML document contains one root element, which contains all other elements An XML document contains one root element, which contains all other elements The lines preceding the root element are the prolog of the XML document The lines preceding the root element are the prolog of the XML document Nested elements are called child elements Nested elements are called child elements

An XML parser is required to process an XML document An XML parser is required to process an XML document The XML parser The XML parser –Checks the document’s syntax –Reports any errors –Allows access to the contents of the document through program control XML Document Structure Cont’d

An XML document is well formed if An XML document is well formed if –It has one root element –It has a start and end tag for each element Except in the case of empty tags that have a special notation that allows the representation of a start and end tag in a single tag Except in the case of empty tags that have a special notation that allows the representation of a start and end tag in a single tag –The tags are properly nested E.g. 100 is a cross tag while 100 is properly nested E.g. 100 is a cross tag while 100 is properly nested

XML Document Structure Cont’d –Attribute values are in quotation marks, either single or double –Elements and attributes are correctly capitalised since XML is case sensitive

XML Document Structure Cont’d XML documents typically contain XML documents typically contain –Carriage returns, –Linefeeds –Elements and attributes –Unicode characters XML elements define structure XML elements define structure XML attributes describe elements XML attributes describe elements

XML Document Structure Cont’d An element may have zero or more attributes An element may have zero or more attributes Attributes are placed within the the start tag Attributes are placed within the the start tag Attribute values are enclosed in single or double quotes Attribute values are enclosed in single or double quotes

XML Document Structure Cont’d Element and attribute names: Element and attribute names: –May be of any length –May contain letters, digits, underscores, hyphens and periods –Must begin with a letter or underscore Spaces are not allowed in element or attribute names Spaces are not allowed in element or attribute names

XML Document Structure Cont’d If an element contains no data it is called an empty element, e.g. If an element contains no data it is called an empty element, e.g. – – An empty tag may be written more concisely as: An empty tag may be written more concisely as: For example, the before-mentioned element may be rewritten as: For example, the before-mentioned element may be rewritten as: – –

XML Parsers There are two main types of XML parsers There are two main types of XML parsers –Parsers that support the Document Object Model (DOM) –Parsers that support the Simple API for XML (SAX)

XML Parsers Cont’d A DOM parser builds a tree structure in memory that contains the document data A DOM parser builds a tree structure in memory that contains the document data A SAX parser processes the document and generates events when certain conditions are met, e.g. A SAX parser processes the document and generates events when certain conditions are met, e.g. –When the start of an element is encountered an event is triggered; the software can then read and the element name and its attributes and respond appropriately

XML Parsers Cont’d Some examples of XML Parsers are: Some examples of XML Parsers are: –msxml – Microsoft’s parser which is built into Microsoft Internet Explorer –Xerces – Apache’s XML project’s parser –JAXP – Sun Microsystem’s Java API for XML Parsing –XML4J – IBM’s XML parser for Java Many of these parsers are freely available Many of these parsers are freely available