Electronic Commerce COMP3210 Session 4: Designing, Building and Evaluating e-Commerce Initiatives – Part II Dr. Paul Walcott Department of Computer Science,

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.
An Introduction to XML Based on the W3C XML Recommendations.
IS 373—Web Standards Todd Will
Sistemi basati su conoscenza XML Prof. M.T. PAZIENZA a.a
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.
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 Extensible Markup Language
Introduction to XML Extensible Markup Language Carol Wolf Computer Science Department.
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.
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.
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.
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
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.
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? 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.
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,
XML Parsers Overview  Types of parsers  Using XML parsers  SAX  DOM  DOM versus SAX  Products  Conclusion.
Tutorial 1: XML Creating an XML Document. 2 Introducing XML XML stands for Extensible Markup Language. A markup language specifies the structure and content.
Web Technologies COMP6115 Session 4: Adding a Database to a Web Site Dr. Paul Walcott Department of Computer Science, Mathematics and Physics 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.
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
Web Technologies COMP6115 Session 4: Adding a Database to a Web Site Dr. Paul Walcott Department of Computer Science, Mathematics and Physics University.
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.
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.
1 Tutorial 11 Creating an XML Document Developing a Document for a Cooking Web Site.
XML Study-Session: Part III
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.
1 Introduction JAXP. Objectives  XML Parser  Parsing and Parsers  JAXP interfaces  Workshops 2.
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.
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:
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.
X M L Extensible Markup Language It is a cross platform tool or a language to achieve data transfer between the cross platform. Note  1.XML is not a replacement.
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 Parsers Overview Types of parsers Using XML parsers SAX DOM
The XML Language.
Chapter 7 Representing Web Data: XML
XML Parsers Overview Types of parsers Using XML parsers SAX DOM
14 XML.
Allyson Falkner Spokane County ISD
XML and Web Services (II/2546)
Presentation transcript:

Electronic Commerce COMP3210 Session 4: Designing, Building and Evaluating e-Commerce Initiatives – Part II Dr. Paul Walcott Department of Computer Science, Mathematics and Physics University of the West Indies, Cave Hill Campus Barbados The Department of Computer Science Mathematics and Physics, University of the West Indies, Cave Hill Campus, Barbados © 2007 Dr. Paul Walcott

Session Objectives After completing this session you will be able to: Compare and contrast the two main types of XML parsers Create an XML document

XML Extensible Markup Language (or XML) is another 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

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 uses a DTD to describe the data 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 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 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 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 Nested elements are called child elements

An XML parser is required to process an XML document 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 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 The tags are 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 Carriage returns, Linefeeds Elements and attributes Unicode characters XML elements define structure XML attributes describe elements

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

XML Document Structure Cont’d 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

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

XML Document Structure Cont’d Recommendations The use of elements are preferred over attributes since attributes do not describe structure and are more difficult to manipulate in program code See for a comprehensive explanation Meta data such as unique identifiers should be stored in attributes For example the use of an id attribute as illustrated in the XML document below The data itself should be stored in elements

XML Document Structure Cont’d A Partial XML database: Walcott Paul UWI Cave Hill Campus Male photo1.jpg …

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 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 A DOM parser is necessary when the user needs to traverse down an up an XML tree It is slow to load since the entire XML document needs to be read into memory and an XML tree needs to be created On the other hand, SAX parsers are much faster since the document is processed as it is being read No backtracking to parent nodes is allowed

XML Parsers Cont’d 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

XML Parsers Cont’d In the laboratory session you will make use of the DOM parser that is available in your web browser Although the application programmers interface (api) for DOM is complex, the News Feed Reader example explains how to read an XML database and use it in a web page

Conclusion In this session the rules for the creation of an XML document were presented In addition, the two main types of XML parsers were compared and contrasted