XML Session 3 Data Islands Document Object Model ParsingNamespaces.

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

1/7 ITApplications XML Module Session 8: Introduction to Programming with XML.
Sue Wills July Objects The JavaScript language is completely centered around objects, and because of this, it is known as an Object Oriented Programming.
SPECIAL TOPIC XML. Introducing XML XML (eXtensible Markup Language) ◦A language used to create structured documents XML vs HTML ◦XML is designed to transport.
An Introduction to XML Based on the W3C XML Recommendations.
XML XML What XML is and what it means to me as a Computer Scientist By: Derek Edwards CS 376 March 10, 2003.
XML Parsing Using Java APIs AIP Independence project Fall 2010.
Computer Information Systems Information Systems California State University Los Angeles Jongwook Woo CIS 561 Design of an E-Commerce Site XML Validation.
AJAX (Asynchronous JavaScript and XML) Amit Jain CS 590 – Winter 2008.
DECO 3002 Advanced Technology Integrated Design Computing Studio Tutorial 5 – XML Basic School of Architecture, Design Science and Planning Faculty of.
Introduction to XML This material is based heavily on the tutorial by the same name at
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.
Chapter 12 Creating and Using XML Documents HTML5 AND CSS Seventh Edition.
Working with Namespaces Combining XML Vocabularies in a Compound Document.
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.
Introduction to XML cs3505. References –I got most of this presentation from this site –O’reilly tutorials.
E X TENSIBLE M ARKUP L ANGUAGE (XML). What is XML?  XML stands for EXtensible Markup Language  XML is mainly designed to carry (or transmit) data, not.
1Computer Sciences Department Princess Nourah bint Abdulrahman University.
XSLT for Data Manipulation By: April Fleming. What We Will Cover The What, Why, When, and How of XSLT What tools you will need to get started A sample.
XML eXtensible Markup Language w3c standard Why? Store and transport data Easy data exchange Create more languages WSDL (Web Service Description Language)
CSC 330 E-Commerce Teacher Ahmed Mumtaz Mustehsan Ahmed Mumtaz Mustehsan GM-IT CIIT Islamabad GM-IT CIIT Islamabad CIIT Virtual Campus, CIIT COMSATS Institute.
Introduction to XML. What is XML? Extensible Markup Language XML Easier-to-use subset of SGML (Standard Generalized Markup Language) XML is a.
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.
CIS 375—Web App Dev II DOM. 2 Introduction to DOM The XML Document ________ Model (DOM) is a programming interface for XML documents. It defines the way.
WEB DESIGN UNIT 2 Unit 2 Module 2-5. WHAT HAVE YOU LEARNED?  What is the title tag do? Where does it show?  What are the tags that need to be on every.
 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
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,
XML 6.4 DOM 6. The XML ‘Alphabet Soup’ XMLExtensible Markup Language Defines XML documents XSLExtensible Stylesheet Language Language for expressing stylesheets;
Introduction to World Wide Web Authoring © Directorate of Information Systems and Services University of Aberdeen, 1999 IT Training Workshop.
1 Dr Alexiei Dingli XML Technologies XML Advanced.
XSLT Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
Presentation Topic: XML and ASP Presented by Yanzhi Zhang.
CIS 275—Web App Dev I XML. 2 Introduction to XMLXML XML stands for ________________________. HTML was designed to display data. XML was designed to _________.
XML Document Object Model Anthony Borquez. The Document Object Model a programming interface for HTML and XML documents. It defines the way a document.
McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Scripting with the DOM Ellen Pearlman Eileen Mullin Programming the Web.
USING XML AS A DATA SOURCE. Data binding is a process by which information in a data source is stored as an object in computer memory. In this presentation,
1 Introduction  Extensible Markup Language (XML) –Uses tags to describe the structure of a document –Simplifies the process of sharing information –Extensible.
XML EXtensible Markup Language. Agenda Introduction to XML XML Rules XML Elements XML Attributes XML Validation XML Exercises XML Namespaces XML CDATA.
XSD Presented by Kushan Athukorala. 2 Agenda XML Namespaces XML Schema XSD Indicators XSD Data Types XSD Schema References.
1 Tutorial 12 Working with Namespaces Combining XML Vocabularies in a Compound Document.
Introduction to Programming the WWW I CMSC Winter 2003 Lecture 10.
EXtensible Markup Language XML Question: What is the most common use of XML Answer: As a buzzword to spice up a resume.
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.
XML A Language Presentation. Outline 1. Introduction 2. XML 2.1 Background 2.2 Structure 2.3 Advantages 3. Related Technologies 3.1 DTD 3.2 Schemas and.
TOPIC II Dynamic HTML Prepared by: Nimcan Cabd Cali.
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 –
 defined as Extensible Markup Language (XML) is a set of rules for encoding documents  Defines structure and data.
XML and Object Serialization. Structure of an XML Document Header Root Element Start Tags / End Tags Element Contents – Child Elements – Text – Both (mixed.
CO1552 – Web Application Development Further JavaScript: Part 1: The Document Object Model Part 2: Functions and Events.
HTML and the DOM. What is HTML? Hypertext Interconnected documents Markup Our code goes around our documents Language Yes, it’s programming.
Dave Salinas. What is XML? XML stands for eXtensible Markup Language Markup language, like HTML HTML was designed to display data, whereas XML was designed.
 XML derives its strength from a variety of supporting technologies.  Structure and data types: When using XML to exchange data among clients, partners,
Javascript Basic Concepts Presentation By: Er. Sunny Chanday Lecturer CSE/IT RBIENT.
XML – Basic Concepts (modified version from Dr. Praveen Madiraju) 2015, Fall Pusan National University Ki-Joune Li.
XML DOM Week 11 Web site:
1 Extensible Stylesheet Language (XSL) Extensible Stylesheet Language (XSL)
Web Basics: HTML/CSS/JavaScript What are they?
Programming Web Pages with JavaScript
Extensible Markup Language XML
Extensible Markup Language XML
Database Processing with XML
Introduction to Internet Programming
Week 11 Web site: XML DOM Week 11 Web site:
More Sample XML By Sadia Anjum.
Document Object Model (DOM): Objects and Collections
Class 4: Building Interactive Web Pages
Murach's JavaScript and jQuery (3rd Ed.)
Presentation transcript:

XML Session 3 Data Islands Document Object Model ParsingNamespaces

Data islands XML embedded in HTML page XML embedded in HTML page Uses unofficial tag in HTML Uses unofficial tag in HTML Example: Example: External file: External file: XML-ers Frank Reminder Don't forget about the assignment!

Binding XML data to HTML Remember our CD collection (cd_catalogue.xml)? Remember our CD collection (cd_catalogue.xml)?(cd_catalogue.xml)? Here is how it could be used as a data island: Here is how it could be used as a data island: The result: (cd_catalogue.htm) The result: (cd_catalogue.htm)(cd_catalogue.htm)

Document Object Model What is a DOM? What is a DOM? In general, a DOM describes the structure of a document in Object terminology: In general, a DOM describes the structure of a document in Object terminology: The XML Document Object Model (XML DOM) defines a standard way for accessing and manipulating XML documents. The XML Document Object Model (XML DOM) defines a standard way for accessing and manipulating XML documents. The DOM presents an XML document as a tree structure, and gives access to the structure through a set of objects. The DOM presents an XML document as a tree structure, and gives access to the structure through a set of objects. To do this you need a parser. You can use a variety of languages. To do this you need a parser. You can use a variety of languages. Example of the DOM being applied to, and unpacking (parsing), a simple XML file, using Javascript: Example of the DOM being applied to, and unpacking (parsing), a simple XML file, using Javascript:using Javascriptusing Javascript Example of parsing the node tree using VBScript: Example of parsing the node tree using VBScript:VBScript Root/Parent Root/Parent object (e.g. Browser window) Child object (e.g. Graphic) Child object (e.g. Text)

Namespaces This piece of XML carries information about fruit in a table: This piece of XML carries information about fruit in a table: This piece of XML carries information about furniture: This piece of XML carries information about furniture: This poses a problem, because they share the same namespace. This poses a problem, because they share the same namespace. Apples Pears Bananas Ikea Sven Coffee Table

Namespaces We could avoid this by providing a prefix to disambiguate the element names: We could avoid this by providing a prefix to disambiguate the element names: … which would appear to solve the problem. … which would appear to solve the problem. Apples Pears Bananas Ikea Sven Coffee Table However!

Namespaces All this prefixing is clumsy, and could lead to errors. All this prefixing is clumsy, and could lead to errors. Why not associate each namespace with an unambiguous identifier? Why not associate each namespace with an unambiguous identifier? Yes, it’s a URL – but it doesn’t have to point to a real resource. Yes, it’s a URL – but it doesn’t have to point to a real resource. Apples Bananas African Coffee Table