Lesson 16. Extensible Markup Language (XML) World Wide Web Consortium (W3C) – non-profit organizations that maintains standards for the web presented.

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

PHP I.
WeB application development
Website Design.
The Web Warrior Guide to Web Design Technologies
DT211/3 Internet Application Development Active Server Pages & IIS Web server.
Project 1 Introduction to HTML.
3 November 2008CIS 340 # 1 Topics To define XML as a technology To place XML in the context of system architectures.
CS 898N – Advanced World Wide Web Technologies Lecture 21: XML Chin-Chih Chang
1 Active Server Pages Active Server Pages (ASPs) are Web pages ASP = server-side scripts + HTML The appearance of an Active Server Page depends on who.
XML Introduction What is XML –XML is the eXtensible Markup Language –Became a W3C Recommendation in 1998 –Tag-based syntax, like HTML –You get to make.
Tutorial 11 Creating XML Document
ASP.NET Programming with C# and SQL Server First Edition
Developing a Basic Web Page with HTML
1st Project Introduction to HTML.
Chapter 2 Introduction to HTML5 Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
Introducing HTML & XHTML:. Goals  Understand hyperlinking  Understand how tags are formed and used.  Understand HTML as a markup language  Understand.
Chapter ONE Introduction to HTML.
McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Beginning Active Server Pages Barry Sosinsky Valda Hilley Programming.
Chapter 12 Creating and Using XML Documents HTML5 AND CSS Seventh Edition.
INTRODUCTION TO WEB DATABASE PROGRAMMING
DAT602 Database Application Development Lecture 14 HTML.
Copyright © cs-tutorial.com. Introduction to Web Development In 1990 and 1991,Tim Berners-Lee created the World Wide Web at the European Laboratory for.
Languages in WEB Presented by: Jenisha Kshatriya BCM SS09.
Dr. Azeddine Chikh IS444: Modern tools for applications development.
JavaScript, Fifth Edition Chapter 1 Introduction to JavaScript.
Basics of Web Databases With the advent of Web database technology, Web pages are no longer static, but dynamic with connection to a back-end database.
3/8/00asp00 1 Active Server Pages from Microsoft Nancy McCracken Northeast Parallel Architectures Center at Syracuse.
Programming with Microsoft Visual Basic 2012 Chapter 12: Web Applications.
16-1 The World Wide Web The Web An infrastructure of distributed information combined with software that uses networks as a vehicle to exchange that information.
CPS120: Introduction to Computer Science The World Wide Web Nell Dale John Lewis.
INTERNET APPLICATION DEVELOPMENT For More visit:
HTML INTRODUCTION, EDITORS, BASIC, ELEMENTS, ATTRIBUTES.
NASRULLAH KHAN.  Lecturer : Nasrullah   Website :
Section 4.1 Format HTML tags Identify HTML guidelines Section 4.2 Organize Web site files and folder Use a text editor Use HTML tags and attributes Create.
 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 21 - Web Servers (IIS, PWS and Apache) Outline 21.1 Introduction 21.2 HTTP Request Types 21.3.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
Tutorial 1: XML Creating an XML Document. 2 Introducing XML XML stands for Extensible Markup Language. A markup language specifies the structure and content.
ASP.NET.. ASP.NET Environment ASP.NET is Microsoft's programming framework that enables the development of Web applications and services. It is an easy.
Introduction to HTML Tutorial 1 eXtensible Markup Language (XML)
CMPS 211 JavaScript Topic 1 JavaScript Syntax. 2Outline Goals and Objectives Goals and Objectives Chapter Headlines Chapter Headlines Introduction Introduction.
XML 2nd EDITION Tutorial 1 Creating An Xml Document.
Active Server Pages  In this chapter, you will learn:  How browsers and servers interacted on the Internet when the Internet first became popular 
Lesson 18. CGI Setup Browser Server CGI Scripts/ Program Database Request Http reply.
XP 1 Creating an XML Document Developing an XML Document for the Jazz Warehouse XML Tutorial.
Introduction to PHP Advanced Database System Lab no.1.
7 Chapter Seven Client-side Scripts. 7 Chapter Objectives Create HTML forms Learn about client-side scripting languages Create a client-side script using.
Chapter 15 Introduction to PL/SQL. Chapter Objectives  Explain the benefits of using PL/SQL blocks versus several SQL statements  Identify the sections.
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.
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.
ASP. What is ASP? ASP stands for Active Server Pages ASP is a Microsoft Technology ASP is a program that runs inside IIS IIS stands for Internet Information.
David Lawrence 7/8/091Intro. to PHP -- David Lawrence.
Web Design and Development. World Wide Web  World Wide Web (WWW or W3), collection of globally distributed text and multimedia documents and files 
NASRULLAH KHAN.  Lecturer : Nasrullah   Website :
XML CSC1310 Fall HTML (TIM BERNERS-LEE) HyperText Markup Language  HTML (HyperText Markup Language): December  Markup  Markup is a symbol.
ASP-2-1 SERVER AND CLIENT SIDE SCRITPING Colorado Technical University IT420 Tim Peterson.
Objective: To describe the evolution of the Internet and the Web. Explain the need for web standards. Describe universal design. Identify benefits of accessible.
Chapter 1 Introduction to JavaScript JavaScript, Third Edition.
Introduction to HTML Simple facts yet crucial to beginning of study in fundamentals of web page design!
Cascading Style Sheet CSS Closing Switch Closing Tag Code View
Dr. Abdullah Almutairi Spring PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages. PHP is a widely-used,
1 CSC160 Chapter 1: Introduction to JavaScript Chapter 2: Placing JavaScript in an HTML File.
1 String Object Using the String object Using the String object Using the String object Using the String object.
1 Chapter 1 INTRODUCTION TO WEB. 2 Objectives In this chapter, you will: Become familiar with the architecture of the World Wide Web Learn about communication.
Web Concepts Lesson 2 ITBS2203 E-Commerce for IT.
Project 1 Introduction to HTML.
JavaScript.
An Introduction to JavaScript
Presentation transcript:

Lesson 16

Extensible Markup Language (XML) World Wide Web Consortium (W3C) – non-profit organizations that maintains standards for the web presented the draft of XML in late 1990’s Inlcudes data management capabilities that HTML cannot provide Consider example of a list of planets –Same HTML tags are decided to be used for information of each planet – actual list can be longer- nine planets –Explain the HTML code –Show the browser result –Shortcoming of HTML – only 6 levels of headings – problem if each planet item has more information elements like color or size of planet –In late 1990’s web professionals considered XML as a list formatting alternative of

Planets Planets PlanetName DistanceFromSun Moons DayLength Mercury 36 million miles None 176 Days Venus 67 million miles None 117 days Earth 93 million miles One 24 Hours

XML differs from HTML in two important respects –XML not a markup language with defined tags- can create own set of tags - –Tags do not provide information how text would appear on a web page, rather tags convey meaning of information included within them-tags define the meaning of facts To understand distinction consider the example of planets again – XML code for it

36 million miles None 176 days 67 million miles None 117 days 93 million miles One 24 Hours

First line of code – declaration – version 1 Root element tags – 2 nd & last line – contains other elements – assigned a name that describes purpose of file Other elements are child elements – country is child element of countrylist – each attribute is child element of country element Names of child elements can be different between two organizations- how share information – capital or capitalcity Many companies have agreed to follow common standards for XML tags – these standards in the form of data type definitions (DTDs) or XML schemas are available for different industries – accounting information, legal information standards etc. In 2001 W3C released a set of rules for XML documents

All elements must be properly nested – content All attribute values must be quoted – All elements with empty content must be identified by ending in /> – All elements must be cased consistently – must not be closed as Certain characters having reserved meanings cannot be used –&, < XML has its rules!

Embedding XML into HTML documents – element can be used anywhere within HTML document to enclose XML content - – element can also be used

XML-example HTML text here spicy

Basic way to render XML is to translate it into html – server side program translates xml documents to html documents at delivery time We write XSL rules that match various xml elements and output the appropriate html XML files are translated using another file which contains formatting instructions Formatting instructions are often written in Extensible Stylesheet Language (XSL) These formatting instructions are read over by special programs – usually these programs are written in Java programming language- called XML Parsers Diagram how web server might process http request for an XML page – explain it

Web Server PC A web client sends an HTTP request for an XML document XML Database Web server requests an XML document from the XML database The XML parser program, which can run on the XML database server or on the Web server, formats the data using a style sheet XSL style sheet XML parser The XML parser sends the newly formatted XML document to the web server The web server delivers the document to the client

Switch A very efficient device Rs …… ….

………

HTML and XML Editors General purpose text-editors, Notepad etc. HTML editors available help create web pages more easily Web site design and creation programs or web page builder softwares – result in one window and code in another Edit in one window and the result is reflected in other Drag and drop images on web browser view page and program automatically generates HTML tags to position it Macromedia Dreamweaver generates the HTML brackets automatically Microsoft FrontPage Xml also in any text editor – programs include Epic Editor, TurboXML – tag validation and editing job becomes easy

Web Server A computer that delivers (serves up) web pages with an IP address and possibly a domain. Any computer can be turned into a Web server by installing server software and connecting the machine to the internet.

Introduction to ASP ASP – Active Server Pages –Used to create web sites that provide user with individualized data, Access to file system and databases and much more… Runs best on IIS - Internet Information Server IIS is available free with windows NT option pack and more popular Windows 2000 ASP engine works with any scripting language (that is compatible with Microsoft Scripting Host requirements) but VBscript is most popular and recommended

Intrinsic Objects To use most objects from a programming language, you must first create an instance of the object you want to use. An object instance is a single copy of an object. You create an instance of an object by creating an object variable, then assigning a new copy of an object to the variable. The process is called instantiation. You don’t have to instantiate ASP objects. The seven objects that ASP exposes are called intrinsic objects because you don’t have to create them. They are always available for you to use on any ASP page.

Intrinsic Objects of ASP Response Object : Used to send information to the client Request Object : Used to retrieve information included with the request from the client Server Object : Used to communicate with the server Application Object : Used to store (cache) information about you application Session Object : Used to cache information about a specific browser instance ( which usually, but not always corresponds to a single user) ObjectContext Object ASPError Object

Variables in VBscript VBSript has only one type of variables – the Variant type, but it can hold any of three kind of values: –scalar values (meaning Boolean, Integer, long, Single, double, Date, curreny, String) –Arrays –object pointers To create a scalar variable, you define varialbe using Dim statement, then you assign values to the variable Dim x x=100 VBscript by default assumes that any symbol that is not a keyword is a variable. This might cause serious problems when you are writing an ASP application. What if you mistype a variable name and it will be considered by the server as a new variable. To avoid this you must write Option Explicit at top of your each ASP file

Response When a browser requests data from the server, the server responds, either with a redirect message, the requested data, or an error message. For HTML requests, the response data comes directly from the Web server, which reads and returns the content of an HTML page. For ASP pages, the response data comes from the ASP object called the response object. The process the web server uses to return a response might be complex but returning a response using a response object couldn’t be easier.

<%Dim lastname Dim firstname Dim myage lastname=“abc” firstname=“xyz” myage=30 %> It is easy My name is and my age is

Response.Write This function of response object can be used to write anything you like on the server side, to create dynamic contents of a web page (even HTML). The Write method accepts a text string. You must surround the text with double quotes

More of Response Object Response Object is not restricted to write function only it has much more to it. Response.Redirect: to redirect the page on submission or otherwise. Like Reponse.Redirect Response.Expires property when set tells the browser when it need to reload the page for example Response.Expire=10 in a page will tell the browser to reload the page after 10 minutes have passed

Request.Form Collection The Request object contains information that the browser sends to the server. The request Object offers five different collection of information one of them is Form which contains information user enters into input controls and information your application has stored in form variables When a browser submits form data using post method, the ASP engine parses the raw HTTP form data and stores it in the Request.Form collection

Name: Address: Login: Password: Confirm Password:

Request.Form(“userlogin”) will give you what user has typed in userlogin text box. Userlogin is the key for request.Form collection to retreive information For example (let it be regcheck.asp) <%Dim loginname Dim name loginname=Request.Form(“userlogin”) name=Request.Form(“username) %> It is easy My name is and I am going to use as my login

Using other programming operatives VB script offers a lot of flexibility to program If statements Loops Many functions to handle your strings Much more…

Test1 <% Dim myString=“ecommerce” %> =#12:00 AM# and Time Good Morning Pakistan Hello Everyone <% Dim j For j=1 to 3 response.write myString response.write “ ” Next %>