Introduction to XML ISYS 573. HTML vs XML HTML is a language specifically designed for displaying information in browser. It doesn’t carry information.

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

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.
ICS-FORTH 1 May 22, 2001 Christos Georgis The extensible markup language: An introduction to XML What is a XML document ? How do we check its validity.
1 CP3024 Lecture 9 XML revisited, XSL, XSLT, XPath, XSL Formatting Objects.
Web Page Introduction. What is a web page? A hypertext that contains clickable links. A web page is a text file containing Hyper Text MarkUp Language.
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
CSE 190: Internet E-Commerce Lecture 17: XML, XSL.
Web Page Introduction. What is a web page? A hypertext that contains clickable links. A web page is a text file containing Hyper Text MarkUp Language.
DECO 3002 Advanced Technology Integrated Design Computing Studio Tutorial 5 – XML Basic School of Architecture, Design Science and Planning Faculty of.
Introduction to XML: Yong Choi CSU Bakersfield.
Web Page Introduction. What is a web page? A web page is a text file containing markup language tags. –A markup language combines text and extra information.
Web Page Introduction. What is a web page? A web page is a text file containing markup language tags. –A markup language combines text and extra information.
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.
Web Page Introduction. What is a web page? A web page is a text file containing markup language tags. –A markup language combines text and extra information.
XML Anisha K J Jerrin Thomas. Outline  Introduction  Structure of an XML Page  Well-formed & Valid XML Documents  DTD – Elements, Attributes, Entities.
Introduction to XML cs3505. References –I got most of this presentation from this site –O’reilly tutorials.
Why XML ? Problems with HTML HTML design - HTML is intended for presentation of information as Web pages. - HTML contains a fixed set of markup tags. This.
XP 1 CREATING AN XML DOCUMENT. XP 2 INTRODUCING XML XML stands for Extensible Markup Language. A markup language specifies the structure and content of.
An Introduction to XML Presented by Scott Nemec at the UniForum Chicago meeting on 7/25/2006.
1 © Netskills Quality Internet Training, University of Newcastle Introducing XML © Netskills, Quality Internet Training University.
CS134 Web Design & Development Creating a Basic Web Page Mehmud Abliz.
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 - Why: The HTML-Dilemma HTML, SGML, XML - How: Syntax, Concept, Language Elements Basics Well-formed XML-Documents (without DTD) Valid XML-Documents.
Sheet 1XML Technology in E-Commerce 2001Lecture 7 XML Technology in E-Commerce Lecture 7 XSL Formatting Objects, Java Data Binding.
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.
These Questions are copied from
Web Page Introduction. What is a web page? A web page is a text file containing markup language tags. –A markup language combines text and extra 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,
1 XML - Extensible Markup Language. 2 HTML - Hypertext Markup Language n HTML has a fixed tag set. n Use these tags to describe how information is to.
XML About XML Things to be known Related Technologies XML DOC Structure Exploring XML.
Tutorial 1: XML Creating an XML Document. 2 Introducing XML XML stands for Extensible Markup Language. A markup language specifies the structure and content.
XML TUTORIAL Portions from w3 schools By Dr. John Abraham.
Introduction to XML and Web Service ISYS 464. HTML vs XML HTML is a language specifically designed for displaying information in browser. It doesn’t carry.
Avoid using attributes? Some of the problems using attributes: Attributes cannot contain multiple values (child elements can) Attributes are not easily.
XML Extensible Markup Language
XP Tutorial 9 1 Working with XHTML. XP SGML 2 Standard Generalized Markup Language (SGML) A standard for specifying markup languages. Large, complex standard.
Softsmith Infotech XML. Softsmith Infotech XML EXtensible Markup Language XML is a markup language much like HTML Designed to carry data, not to display.
Of 33 lecture 3: xml and xml schema. of 33 XML, RDF, RDF Schema overview XML – simple introduction and XML Schema RDF – basics, language RDF Schema –
XML 2nd EDITION Tutorial 1 Creating An Xml Document.
Waqas Anwar Next SlidePrevious Slide. Waqas Anwar Next SlidePrevious Slide XML XML stands for EXtensible Markup Language.
1 Introduction  Extensible Markup Language (XML) –Uses tags to describe the structure of a document –Simplifies the process of sharing information –Extensible.
XP 1 Creating an XML Document Developing an XML Document for the Jazz Warehouse XML Tutorial.
17 Apr 2002 XML Syntax: Documents Andy Clark. Basic Document Structure Element tags – Elements have associated attributes Text content Miscellaneous –
Accessing Data Using XML CHAPTER NINE Matakuliah: T0063 – Pemrograman Visual Tahun: 2009.
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.
XML Introduction. What is XML? XML stands for eXtensible Markup Language XML stands for eXtensible Markup Language XML is a markup language much like.
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.
XML Introduction. Markup Language A markup language must specify What markup is allowed What markup is required How markup is to be distinguished from.
CS 157B: Database Management Systems II February 11 Class Meeting Department of Computer Science San Jose State University Spring 2013 Instructor: Ron.
Internet & World Wide Web How to Program, 5/e. © by Pearson Education, Inc. All Rights Reserved.2.
Unit 3 — Advanced Internet Technologies Lesson 11 — Introduction to XSL.
Introduction to XML and Web Service ISYS 512/812.
Web Page Introduction. What is a web page? A hypertext that contains clickable links. A web page is a text file containing Hyper Text MarkUp Language.
C Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Introduction to XML Standards.
Introduction to XML Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved Chapter 7 Representing Web Data:
CHAPTER NINE Accessing Data Using XML. McGraw Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved Introduction The eXtensible.
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.
Rendering XML Documents ©NIITeXtensible Markup Language/Lesson 5/Slide 1 of 46 Objectives In this session, you will learn to: * Define rendering * Identify.
1 Extensible Stylesheet Language (XSL) Extensible Stylesheet Language (XSL)
1 Cascading Style Sheet (CSS). 2 Cascading Style Sheets (CSS)  a style defines the appearance of a document element. o E.g., font size, font color etc…
Web Page Introduction.
Unit 4 Representing Web Data: XML
Extensible Markup Language XML
XML QUESTIONS AND ANSWERS
Extensible Markup Language XML
Chapter 7 Representing Web Data: XML
Presentation transcript:

Introduction to XML ISYS 573

HTML vs XML HTML is a language specifically designed for displaying information in browser. It doesn’t carry information about the structure of the content held within its page. XML (Extensible MarkUp Language) is a language used to represent data in a form that does not rely on any particular proprietary technology. It uses user-defined tags to give meaningful names to data elements. With XML, we separate the data content from the data presentation.

HTML My Favorite Book ISBN Authors: John Smith Peter Chen Price: $45.00 Description: This is a grerat book

XML John Smith Peter Chen David Chao $45.00 This is a grerat book Adam Smith $25.00 This is a second great book

XML Document Well-formed documents: –Documents comply with the rules of XML syntax. Valid documents: –Documents that are well-formed and comply with a XML schema or Document Type Definition (DTD is a file containing the rules used to define the document).

Well-Formed Documents There is only one root node. All elements must have a start tag and an end tag (except for an empty element, see example below) Elements must be nested correctly. If an element has an attribute, the attribute value must be quoted. –An empty element with an attribute: Note: XML is case sensitive.

XML Documents The XML declaration: – –Note: xml should be in lower case. Namespaces –Define a namespace:xmlns:”uri” where the Uniform Resource Identifier is a unique identifier and is often a URL. –Use a namespace to make a tag unique: Elements: –Each start-tag/end-tag pair, with the data that lies between them, is an element. –Ex. John Smith –The start and end tag must be in the same case.

Attributes: Elements can have attributes. These are values that are passed to the application, but not constitute part of the content of the element. Attributes are included as part of the element’s start tag, and values must be enclosed in quote marks. – Spinach – Carrot

Comments: – Processing instructions: These allow documents to contain instructions for applications using XML data. –

Tree View of XML Books Book ISBN Authors Price Description Book ISBN Authors Price Description Author

Valid Documents Well-formed documents that conform to an XML schema or DTD. XML parsers are programs that are able to validate an XML document against schema or DTD. XML parsers are included in IE5 and Netscapt 6 and onwards.

XML Schema Definition of an XML Document Namespaces: Allow element names to be qualified to avoid name collisions. Complex and simple types: –Elements that contains other elements are complex type. Cardinality: –minOccurs: 0 for optional element. –maxOccurs: specified number or unbounded Compositor: –Sequence: defines an ordered sequence of subelements. –Choice: defines a choice between several possible elements. Constraints: –Uniqueness contraint

VS.Net Tools for XML Document and Schema Dataset schema XML Schema XML Document

Style Sheets XSL: Extensible Stylesheet Language Tell the browser how to display the XML document. With a style sheet, all of the style rules are kept in one file and the source document simply links to this file. File extension:.CSS

Benefits of Using Style Sheets Improve document clarity: No tags such as in an XML document. Allow you to modify the presentation of several pages by altering just one file. Allow you to present the same data in different ways for different purposes. Reduce download time by caching the style sheet on the client.

Browser screen structure: –Page Area –Block Flow Object: Taking up the whole line. –In-Line Flow Object: Several in-line objects may be on the same line.

My Favorite Book John Smith Peter Chen $45.00 This is a grerat book My Second Favorite Book Adam Smith $25.00 This is a second great book

btitle{ display:block; font-family: Aerial, Helvetica; font-weight: bold; font-size: 20pt; color: #9370db; text-align: center; } ISBN{ display:block; font-family: Aerial, Helvetica; font-weight: bold; font-size: 12pt; color: #c71585; text-align: left; } Authors{ display:inline; font-family: Aerial, Helvetica; font-style: italic; font-size: 10pt; color: #9370db; text-align: left; }

Price{ display:block; font-family: Aerial, Helvetica; font-size: 12pt; color: #ff1010; text-align: left; } Description { display:block; font-family: Aerial, Helvetica; font-size: 12pt; color: #ff1010; text-align: left; }

Styling XML with XSLT XSLT: Extensible Stylesheet Language Transforms XSLT provides a means of transforming one XML document into HTML or another XML document.

Creating XML From DataSet DataSet object: –WriteXML(xml file path and name) –WriteXMLSchema(xml schema path and name) Demo:ASPNet/XMLWrite.ASPX

dim strConn as string ="Provider=Microsoft.Jet.OLEDB.4.0;Data Source = c:\sales2k.mdb" dim objConn as new OledbConnection(strConn) dim strSQL as string = "select * from customer;" dim objDataSet as new Dataset() dim objAdapter as new OledbDataAdapter(strSQL, objConn) objAdapter.Fill(objDataSet, "Cust") dim objDataView as new DataView(objDataSet.tables("Cust")) dgCustomer.Datasource=objDataView dgCustomer.DataBind() objDataSet.writeXML("c:\inetpub\wwwroot\testWriteX ML.XML")

Reading Data into a DataSet from an XML File Dataset object: –ReadXMLSchema(file path and name) –ReadXML(file path and name) Demo: ASPNet/XMLRead.aspx

dim objDataSet as new Dataset() objDataSet.ReadXML("c:\inetpub\wwwroot\testW riteXML.XML") dim objDataView as new DataView(objDataSet.tables("Cust")) dgCustomer.Datasource=objDataView dgCustomer.DataBind() end sub