1/7 ITApplications XML Module Session 8: Introduction to Programming with XML.

Slides:



Advertisements
Similar presentations
Copyright © 2003 Pearson Education, Inc. Slide 8-1 Created by Cheryl M. Hughes, Harvard University Extension School Cambridge, MA The Web Wizards Guide.
Advertisements

University of Jyväskylä/AHo & VLy Experiences of Document Transformations with XSLT and DOM Anne Honkaranta, Virpi Lyytikäinen, Pasi Tiitinen, University.
XML Parsing Using Java APIs AIP Independence project Fall 2010.
©Silberschatz, Korth and Sudarshan10.1Database System Concepts W3C Activities HTML: is the lingua franca for publishing on the Web XHTML: an XML application.
Xerces The Apache XML Project Yvonne Yao. Introduction Set of libraries that provides functionalities to parse XML documents Set of libraries that provides.
XML A brief introduction ---by Yongzhu Li. XML --- a brief introduction 2 CSI668 Topics in System Architecture SUNY Albany Computer Science Department.
AJAX (Asynchronous JavaScript and XML) Amit Jain CS 590 – Winter 2008.
Does Ajax suck? CS575 Spring 2007 Chanwit Suebsureekul.
CS 898N – Advanced World Wide Web Technologies Lecture 22: Applying XML Chin-Chih Chang
Chapter 9 Introduction to the Document Object Model (DOM) JavaScript, Third Edition.
COS 381 Day 16. Agenda Assignment 4 posted Due April 1 There was no resubmits of Assignment Capstone Progress report Due March 24 Today we will discuss.
ITM352 Javascript and Dynamic Web Pages: Client Side Processing.
By: Shawn Li. OUTLINE XML Definition HTML vs. XML Advantage of XML Facts Utilization SAX Definition DOM Definition History Comparison between SAX and.
DHTML. What is DHTML?  DHTML is the combination of several built-in browser features in fourth generation browsers that enable a web page to be more.
CS 4720 RESTfulness and AJAX CS 4720 – Web & Mobile Systems.
Ruth Betcher Ruth Christie
XForms: A case study Rajiv Shivane & Pavitar Singh.
1 XML at a neighborhood university near you Innovation 2005 September 16, 2005 Kwok-Bun Yue University of Houston-Clear Lake.
Lecture 2 : Understanding the Document Object Model (DOM) UFCFR Advanced Topics in Web Development II 2014/15 SHAPE Hong Kong.
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.
Instructor, Dr. Khalili Bahram Jeevan Kumar Gogineni.
Advanced Java Session 9 New York University School of Continuing and Professional Studies.
Intro. to XML & XML DB Bun Yue Professor, CS/CIS UHCL.
The Document Object Model. The Web B.D, A.D. They aren’t web pages, they’re document objects A web browser interprets structured information. A server.
Electronic Commerce COMP3210 Session 4: Designing, Building and Evaluating e-Commerce Initiatives – Part II Dr. Paul Walcott Department of Computer Science,
Client side web programming Introduction Jaana Holvikivi, DSc. School of ICT.
Weekend MS CS Program Internet and Web Technologies COT 5930 Web Project Development - Ajax Dr. Roy Levow, Associate Chair & Professor
Presentation Topic: XML and ASP Presented by Yanzhi Zhang.
XML Extensible Markup Language
Javascript II DOM & JSON. In an effort to create increasingly interactive experiences on the web, programmers wanted access to the functionality of browsers.
WEB BASED DATA TRANSFORMATION USING XML, JAVA Group members: Darius Balarashti & Matt Smith.
McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Scripting with the DOM Ellen Pearlman Eileen Mullin Programming the Web.
Building Rich Web Applications with Ajax Linda Dailey Paulson IEEE – Computer, October 05 (Vol.38, No.10) Presented by Jingming Zhang.
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 and Its Applications Ben Y. Zhao, CS294-7 Spring 1999.
SAX2 and DOM2 Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
XML eXtensible Markup Language. XML A method of defining a format for exchanging documents and data. –Allows one to define a dialect of XML –A library.
XML Parser. 2 Microsoft XML data by itself cannot do anything; you need to process that data to do something meaningful. The software that processes XML.
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 –
What is XML? eXtensible Markup Language eXtensible Markup Language A subset of SGML (Standard Generalized Markup Language) A subset of SGML (Standard Generalized.
©Silberschatz, Korth and Sudarshan10.1Database System Concepts W3C - The World Wide Web Consortium W3C - The World Wide Web Consortium.
Martin Kruliš by Martin Kruliš (v1.1)1.
AJAX and REST. Slide 2 What is AJAX? It’s an acronym for Asynchronous JavaScript and XML Although requests need not be asynchronous It’s not really a.
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.
JavaScript & Introduction to AJAX
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved Chapter 7 Representing Web Data:
Overview Web Technologies Computing Science Thompson Rivers University.
XML DOM Week 11 Web site:
XML 1.Introduction to XML 2.Document Type Definition (DTD) 3.XML Parser 4.Example: CGI Gateway to XML Middleware.
I Copyright © 2004, Oracle. All rights reserved. Introduction.
DHTML.
Web Technologies Computing Science Thompson Rivers University
Project 1 Introduction to HTML.
Unit 4 Representing Web Data: XML
Chapter 1 Introduction to HTML.
AJAX and REST.
Application with Cross-Platform GUI
Asynchronous Java script And XML Technology
XML in Web Technologies
Introduction to Internet Programming
Chapter 7 Representing Web Data: XML
HTML A brief introduction HTML.
XML Data Introduction, Well-formed XML.
More Sample XML By Sadia Anjum.
Web Technologies Computing Science Thompson Rivers University
XML Parsers.
Class 4: Building Interactive Web Pages
XML Programming in Java
Extensible Markup Language (XML)
Presentation transcript:

1/7 ITApplications XML Module Session 8: Introduction to Programming with XML

2/7 Introduction – Programming with XML XML documents, when parsed, are represented as a hierarchical tree structure. This structure can be accessed by a programming tool via an API. SAX and DOM are two dramatically different APIs for accessing information in XML documents. XML documents, when parsed, are represented as a hierarchical tree structure. This structure can be accessed by a programming tool via an API. SAX and DOM are two dramatically different APIs for accessing information in XML documents.

3/7 Event-driven programming with Simple API for XML (SAX) SAX was developed by the W3C and released in SAX-based parsers invoke methods when markup (e.g. a start tag, an end tag, etc.) is encountered. No tree structure is created - data is passed to the application from the XML document as it is found. SAX parsers are typically used for reading XML documents that will not be modified. SAX was developed by the W3C and released in SAX-based parsers invoke methods when markup (e.g. a start tag, an end tag, etc.) is encountered. No tree structure is created - data is passed to the application from the XML document as it is found. SAX parsers are typically used for reading XML documents that will not be modified. SAX-based parsers are available for a variety of programming languages; C++, Java, and Perl being the most popular. SAX is based on an event-driven model using call-backs to handle processing. SAX-based parsers are available for a variety of programming languages; C++, Java, and Perl being the most popular. SAX is based on an event-driven model using call-backs to handle processing.

4/7 What an event-driven program can do: What an event-driven program can do: Search a document for an element containing a keyword Search a document for an element containing a keyword Print out formatted content Print out formatted content Modify an XML document by making small changes, such as fixing spelling and renaming elements Modify an XML document by making small changes, such as fixing spelling and renaming elements Read data to build a complex data structure Read data to build a complex data structure What an event-driven program can't do: What an event-driven program can't do: Re-order the elements in a document Re-order the elements in a document Resolve cross-references between elements Resolve cross-references between elements Verify ID-IDREF links Verify ID-IDREF links Validate an XML document Validate an XML document

5/7 Event-driven programming with Document Object Model (DOM) The W3C provides a standard recommendation for building a tree structure in memory for XML documents called the XML Document Object Model (DOM). A DOM-based parser exposes (i.e. makes available) a library, called the DOM Application Programming Interface (API), that allows data in an XML document to be accessed and modified by manipulating the nodes in a DOM tree. The W3C provides a standard recommendation for building a tree structure in memory for XML documents called the XML Document Object Model (DOM). A DOM-based parser exposes (i.e. makes available) a library, called the DOM Application Programming Interface (API), that allows data in an XML document to be accessed and modified by manipulating the nodes in a DOM tree.

6/7 Event-driven programming with Asynchronous JavaScript and XML (Ajax) Ajax is a web development technique that makes use of a combination of: Ajax is a web development technique that makes use of a combination of: HTML/XHTML and stylesheets (CSS) for data presentation. HTML/XHTML and stylesheets (CSS) for data presentation. The DOM is programmed using Javascript for dynamically displaying data. The DOM is programmed using Javascript for dynamically displaying data. An XMLHttpRequest object is used to exchange XML data asynchronously between a browser and a web server. An XMLHttpRequest object is used to exchange XML data asynchronously between a browser and a web server.

7/7 Concluding Remarks and Coursework Assignment Let’s read the FMA assignment and clarify any questions you may have. Let’s read the FMA assignment and clarify any questions you may have. Any Final Questions ??? Any Final Questions ???