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,

Slides:



Advertisements
Similar presentations
Chapter 16 Dynamic HTML: Data Binding with Tabular Data Control.
Advertisements

Samsung Smart TV is a web-based application running on an application engine installed on digital TVs connected to the Internet.
Tutorial 6 Creating a Web Form
HTML 5 and CSS 3, Illustrated Complete Unit L: Programming Web Pages with JavaScript.
Microsoft Excel 2003 Illustrated Complete Excel Files and Incorporating Web Information Sharing.
The Web Warrior Guide to Web Design Technologies
Integrating Access with the Web and with Other Programs.
Tutorial 16 Working with Dynamic Content and Styles.
Creating Web Page Forms. Objectives Describe how Web forms can interact with a server-based program Insert a form into a Web page Create and format a.
Tutorial 6 Working with Web Forms
Chapter 12: ADO.NET and ASP.NET Programming with Microsoft Visual Basic.NET, Second Edition.
XP Tutorial 6: Creating Web Page Forms. XP An Example of a Form.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Fluency with Information Technology Third Edition by Lawrence Snyder Chapter.
1 CA201 Word Application Creating Document for the Web Week # 9 By Tariq Ibn Aziz Dammam Community college.
JavaScript 101 Lesson 5: Introduction to Events. Lesson Topics Event driven programming Events and event handlers The onClick event handler for hyperlinks.
Tutorial 6 Working with Web Forms. XP Objectives Explore how Web forms interact with Web servers Create form elements Create field sets and legends Create.
A02 Creating my website NAME ______________. UNIT 2 – A02 – Creating my Website The purpose of this assessment objective is to create 5 web pages containing.
Creating Web Page Forms
CST JavaScript Validating Form Data with JavaScript.
1 ADVANCED MICROSOFT WORD Lesson 15 – Creating Forms and Working with Web Documents Microsoft Office 2003: Advanced.
Chapter 9 Collecting Data with Forms. A form on a web page consists of form objects such as text boxes or radio buttons into which users type information.
Chapter 12 Creating and Using XML Documents HTML5 AND CSS Seventh Edition.
XP New Perspectives on XML Tutorial 3 1 DTD Tutorial – Carey ISBN
Some Basic Database Terminology
XP Tutorial 6New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Creating Web Page Forms Designing a Product Registration Form Tutorial.
XP Tutorial 6New Perspectives on HTML and XHTML, Comprehensive 1 Creating Web Page Forms Designing a Product Registration Form Tutorial 6.
1 Creating Web Forms in HTML Web forms collect information from customers Web forms include different control elements including: –Input boxes –Selection.
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
The Bean Counter: A JavaScript Program
Using Visual Basic 6.0 to Create Web-Based Database Applications
Web Development Using ASP.NET CA – 240 Kashif Jalal Welcome to week – 4-1 of…
Adding User Interactivity – Lesson 51 Adding User Interactivity Lesson 5.
Tutorial 7 Creating Forms. Objectives Session 7.1 – Create an HTML form – Insert fields for text – Add labels for form elements – Create radio buttons.
HTML Concepts and Techniques Fourth Edition Project 12 Creating and Using XML Documents.
XP 1 New Perspectives on XML Binding XML Data with Internet Explorer.
1 Introduction  Extensible Markup Language (XML) –Uses tags to describe the structure of a document –Simplifies the process of sharing information –Extensible.
New Perspectives on XML, 2nd Edition Tutorial 9B1 USING XML AS A DATA SOURCE TUTORIAL 9B.
PHP Form Introduction Getting User Information Text Input.
Tutorial 6 Working with Web Forms. XP Objectives Explore how Web forms interact with Web servers Create form elements Create field sets and legends Create.
Tutorial 6 Working with Web Forms. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Explore how Web forms interact with.
Tutorial 91 Databases A database is an organized collection of related information stored in a file on a disk A database allows companies to store information.
Creating Web Page Forms. Introducing Web Forms Web forms collect information from users Web forms include different control elements including: –Input.
Creating Links. The Anchor Element: The anchor tag can be used in three different ways: 1.External link – to link to a web page outside your own website.
1 HTML Forms
Microsoft FrontPage 2003 Illustrated Complete Creating a Form.
Data Binding with Tabular Data Control. Objective To understand Dynamic HTML data binding. To be able to sort and filter data directly on the client without.
Chapter 2: Variables, Functions, Objects, and Events JavaScript - Introductory.
Chapter 16 DHTML: Data Binding CIS 275—Web Application Development for Business I.
HTML Overview Part 5 – JavaScript 1. Scripts 2  Scripts are used to add dynamic content to a web page.  Scripts consist of a list of commands that execute.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
Tutorial 6 Working with Web Forms. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Explore how Web forms interact with.
Creating Web Page Forms COE 201- Computer Proficiency.
Introducing Dreamweaver. Dreamweaver The web development application used to create web pages Part of the Adobe creative suite.
Tutorial 10 Programming with JavaScript. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Learn the history of JavaScript.
XP Review 1 New Perspectives on JavaScript, Comprehensive1 Introducing HTML and XHTML Creating Web Pages with HTML.
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 8 1 Microsoft Office Access 2003 Tutorial 8 – Integrating Access with the.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
Tutorial 10 Programming with JavaScript. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Learn the history of JavaScript.
B Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Working with PDF and eText Templates.
JavaScript Events Java 4 Understanding Events Events add interactivity between the web page and the user You can think of an event as a trigger that.
JavaScript Events. Understanding Events Events add interactivity between the web page and the user Events add interactivity between the web page and the.
Tutorial 6 Creating a Web Form
HTML Tutorial. What is HTML HTML is a markup language for describing web documents (web pages) HTML documents are described by HTML tags Each HTML tag.
Embedding XML in HTML: Using Data Islands Eugenia Fernandez IUPUI.
Generating XML Data from a Database Eugenia Fernandez IUPUI.
XP Tutorial 6New Perspectives on HTML, XHTML, and DHTML, Comprehensive 1 Creating Web Page Forms Designing a Product Registration Form Tutorial 6.
Tutorial 6 Working with Web Forms
Microsoft Office Access 2003
Microsoft Office Access 2003
A02 Creating my website NAME ______________.
Presentation transcript:

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, the data source is an XML document containing information. The Web pages uses placeholders which we will later populate with data from two XML documents.

USING XML AS A DATA SOURCE

DATA BINDING WITH SEVERAL WEB PAGES

FIELDS, RECORDS, AND RECORDSETS Data in a data source is organized by fields, records, and recordsets. A field is an element that contains a single item of information such as an employees last name. A record is a collection of those fields. A recordset is a collection of records.

DATA ISLANDS The first step in data binding is to attach the Web page to a recordset. The attached data is called a data island. They can be either external files or code entered into the HTML file. The syntax to create a data island from an external file is: Here, id is the id name assigned to the data island URL is the filename and location of the external XML file

DATA ISLANDS For example: This creates a data island named Company attached to Company.xml.

DATA ISLANDS To insert a data island directly into the HTML file, use this syntax: xml code

DATA ISLANDS Data islands are stored by the XML parser as a Data Source Object (DSO). The DSO takes care of the interaction between the Web page and the data island. Also, program code can be written to control the actions of the DSO such as specifying which records will be displayed in the Web page at any one time.

BINDING AN HTML ELEMENT TO A FIELD After the data island has been created, the elements in the XML document need to be bound to the HTML file. The syntax is: Here, tag is the name of the HTML tag, id is the name of the data island, and field is the name of the field in the data source.

HTML ELEMENTS THAT SUPPORT DATA BINDING

BINDING TO AN XML ATTRIBUTE Attributes are treated by the DSO as fields. If the attribute is part of a record element, it is easy to bind attribute values to a Web page. If the attribute is part of a field element, it is still treated by the DSO as a field element.

BINDING TO AN XML ATTRIBUTE The field element containing the attribute becomes a record element. Remember to reference all character data within an element using the $TEXT field. It is a good idea not to use attributes in field elements if you plan to do data binding.

THE DATA SOURCE OBJECT ActiveX Data Objects (ADO) is a data-access technology developed by Microsoft. ADO allows you to work with the Data Source Object by applying a method or by changing one of the properties of the DSO. The syntax for applying a method is: id.recordset.method()

THE DATA SOURCE OBJECT Here, id is the name of the data island in the Web document and method is the name of the method supported by ADO. There are several methods that can be applied to DSOs.

THE DATA SOURCE OBJECT

When the user clicks the button, the browser runs the command indicated by the onClick event handler, displaying the last record.

TABLE BINDING Using table data binding, each record can be displayed in a different row of a table. The syntax is:

TABLE BINDING In the example, id is the name of the data island, field1, field2 are the fields from the recordset.

TABLE PAGES As you add more records to your XML document, a table can become long and unwieldy. One way to fix this is to give the user the option of limiting the number of records displayed at any one time. The user can then move forward of backward that number of records at a time. This is called paging.

TABLE PAGES To specify the page size, add the dataPageSize attribute to the tag: datapagesize=“number” number is the number of records you want displayed in a single page.

NAVIGATING A TABLE PAGE A unique identifier must be assigned to a table using the ID attribute before writing a command to navigate a table page. The syntax to do this is: Here, id is the name you assign to the table object. This is needed because the commands to navigate the table pages act on the table itself not the recordset.

TABLE METHODS AND PROPERTIES

To run these commands, add the command to the onClick event handler of a tag. For example, to move to the last page in a data table named “StaffTable”, you enter the attribute: onClick=“productTable.lastPage( )”