Thayer School of Engineering Dartmouth Lecture 2 Overview Web Services concept XML introduction Visual Studio.net.

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

CSCI N241: Fundamentals of Web Design Copyright ©2004 Department of Computer & Information Science Introducing XHTML: Module B: HTML to XHTML.
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.
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.
Extensible Markup Language XML MIS 520 – Database Theory Fall 2001 (Day) Lecture 14.
Tutorial 9 Working with XHTML. XP Objectives Describe the history and theory of XHTML Understand the rules for creating valid XHTML documents Apply a.
26-Jun-15 XML. 2 HTML and XML, I XML stands for eXtensible Markup Language HTML is used to mark up text so it can be displayed to users XML is used to.
Thayer School of Engineering Dartmouth Class Overview DTD Project discussion Visual Studio.NET Assignment 1.
XML Primer. 2 History: SGML vs. HTML vs. XML SGML (1960) XML(1996) HTML(1990) XHTML(2000)
Introducing XHTML: Module B: HTML to XHTML. Goals Understand how XHTML evolved as a language for Web delivery Understand the importance of DTDs Understand.
Introduction to XML This material is based heavily on the tutorial by the same name at
Introducing HTML & XHTML:. Goals  Understand hyperlinking  Understand how tags are formed and used.  Understand HTML as a markup language  Understand.
Copyright © 2003 Pearson Education, Inc. Slide 2-1 Created by Cheryl M. Hughes, Harvard University Extension School — Cambridge, MA The Web Wizard’s Guide.
XML introduction to Ahmed I. Deeb Dr. Anwar Mousa  presenter  instructor University Of Palestine-2009.
XP Tutorial 9New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Working with XHTML Creating a Well-Formed Valid Document Tutorial 9.
Introduction to XML cs3505. References –I got most of this presentation from this site –O’reilly tutorials.
XML eXtensible Markup Language by Darrell Payne. Experience Logicon / Sterling Federal C, C++, JavaScript/Jscript, Shell Script, Perl XML Training XML.
XML CPSC 315 – Programming Studio Fall 2008 Project 3, Lecture 1.
XML What is XML? XML v.s. HTML XML Components Well-formed and Valid Document Type Definition (DTD) Extensible Style Language (XSL) SAX and DOM.
1 herbert van de sompel CS 502 Computing Methods for Digital Libraries Cornell University – Computer Science Herbert Van de Sompel
XML 1 Enterprise Applications CE00465-M XML. 2 Enterprise Applications CE00465-M XML Overview Extensible Mark-up Language (XML) is a meta-language that.
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.
 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 Tutorial 13 Validating Documents with DTDs Working with Document Type Definitions.
Avoid using attributes? Some of the problems using attributes: Attributes cannot contain multiple values (child elements can) Attributes are not easily.
How do I use HTML and XML to present information?.
XML A web enabled data description language 4/22/2001 By Mark Lawson & Edward Ryan L’Herault.
1 Chapter 10: XML What is XML What is XML Basic Components of XML Basic Components of XML XPath XPath XQuery XQuery.
Softsmith Infotech XML. Softsmith Infotech XML EXtensible Markup Language XML is a markup language much like HTML Designed to carry data, not to display.
XML 2nd EDITION Tutorial 1 Creating An Xml Document.
XML - DTD Week 4 Anthony Borquez. What can XML do? provides an application independent way of sharing data. independent groups of people can agree to.
VICTORIA UNIVERSITY OF WELLINGTON Te Whare Wananga o te Upoko o te Ika a Maui SWEN 432 Advanced Database Design and Implementation An Introduction to XML.
XML Documents Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University Elements Attributes Comments PI Document.
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 Instructor: Charles Moen CSCI/CINF XML  Extensible Markup Language  A set of rules that allow you to create your own markup language  Designed.
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 –
Lecture 16 Introduction to XML Boriana Koleva Room: C54
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.
An Introduction to XML Sandeep Bhattaram
XML Introduction. What is XML? XML stands for eXtensible Markup Language XML stands for eXtensible Markup Language XML is a markup language much like.
The eXtensible Markup Language (XML). Presentation Outline Part 1: The basics of creating an XML document Part 2: Developing constraints for a well formed.
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 Basics A brief introduction to XML in general 1XML Basics.
1 Tutorial 11 Creating an XML Document Developing a Document for a Cooking Web Site.
C# and Windows Programming XML Processing. 2 Contents Markup XML DTDs XML Parsers DOM.
1 herbert van de sompel CS 502 Computing Methods for Digital Libraries Cornell University – Computer Science Herbert Van de Sompel
COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 4 1COMP9321, 15s2, Week.
225 City Avenue, Suite 106 Bala Cynwyd, PA , phone , fax presents… XML Syntax v2.0.
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 –
Well Formed XML The basics. A Simple XML Document Smith Alice.
What is XML? eXtensible Markup Language eXtensible Markup Language A subset of SGML (Standard Generalized Markup Language) A subset of SGML (Standard Generalized.
Introduction to XML XML – Extensible Markup Language.
Introduction to DTD A Document Type Definition (DTD) defines the legal building blocks of an XML document. It defines the document structure with a list.
XML CSC1310 Fall HTML (TIM BERNERS-LEE) HyperText Markup Language  HTML (HyperText Markup Language): December  Markup  Markup is a symbol.
XP Tutorial 9New Perspectives on HTML and XHTML, Comprehensive 1 Working with XHTML Creating a Well-Formed Valid Document Tutorial 9.
Evaluation Biztalk Table of Contents Introduction to XML. Anatomy of an XML document. What is an XML Schema? What is SOAP? XML Web Services overview.
Tutorial 9 Working with XHTML. New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition 2 Objectives Describe the history and theory of XHTML.
XML CORE CSC1310 Fall XML DOCUMENT XML document XML document is a convenient way for parsers to archive data. In other words, it is a way to describe.
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:
Tutorial 9 Working with XHTML. XP Objectives Describe the history and theory of XHTML Understand the rules for creating valid XHTML documents Apply a.
Unit 4 Representing Web Data: XML
The XML Language.
Chapter 7 Representing Web Data: XML
Web Programming Maymester 2004
Allyson Falkner Spokane County ISD
Review of XML IST 421 Spring 2004 Lecture 5.
Presentation transcript:

Thayer School of Engineering Dartmouth Lecture 2 Overview Web Services concept XML introduction Visual Studio.net

Thayer School of Engineering Dartmouth HTML is HyperTex Markup Language HTML is a “specialization” of SGML HTML is a language for describing how web pages should look. HTML has some constructions for forms, frames, etc that make it a bit more dynamic. HTML is very simple....we’re going to go over only the basics...other sources: - read the source of other pages - web HTML manuals and how-to’s HTML Primer

Thayer School of Engineering Dartmouth Basic syntax of an HTML HTML uses “tags” tags typically have a beginning and a closing version. example....every html page should start with the tag – and end with – Not essential but good style.

Thayer School of Engineering Dartmouth Basic structure of an HTML page Our first page!! Blah, blah, blah

Thayer School of Engineering Dartmouth Why Web Services? HTML describes the formatting of a web page Originally designed to let people read web pages easily via that formatting The structure of the page is not necessarily conveyed by HTML The meaning of a page is certainly not in the HTML If programs are to consume information on web pages, then HTML is not enough

Thayer School of Engineering Dartmouth What are Web Services? A language to define web resources’ structure/syntax - XML A transport protocol for moving XML - SOAP A language to describe a service – WSDL Directory-like services to locate XML described services - UDDI

Thayer School of Engineering Dartmouth Example of XML Mocha Java Sumatra 12.50

Thayer School of Engineering Dartmouth XML Overview XML vs HTML –HTML is a presentation markup language –XML is a content markup language –both are derivatives of SGMLSGML –“elements”, “attributes”, “values” and content –syntax is more strict in XML than in HTML –large development activity underway –version 1.0

Thayer School of Engineering Dartmouth Examples DARPA Agent Markup Language (DAML) Genome information XML registries MathML

Thayer School of Engineering Dartmouth Example Created with a text editor and saved in file.xml Jane Smith AT&T (212)

Thayer School of Engineering Dartmouth Example Jane Smith elementattributevalue content Elements can be nested interspersed with “text” Jane Smith works at AT&T.

Thayer School of Engineering Dartmouth XML Declaration All XML documents can optionally begin with an XML declaration. The XML declaration provides at a minimum the number of the version of XML in use: Currently, 1.0 is the only approved version of XML, but others may appear in the future. The XML declaration can also specify the character encoding used in the document:

Thayer School of Engineering Dartmouth Encodings All XML parsers: Unicode “UTF-8” and “UTF-16” encodings. the XML declaration is case sensitive: it may not begin with “<?XML” or any other variant; if the XML declaration appears at all, it must be the very first thing in the XML document: not even whitespace or comments may appear before it; and it is legal for a transfer protocol like HTTP to override the encoding value that you put in the XML declaration, so you cannot guarantee that the document will actually use the encoding provided in the XML declaration.

Thayer School of Engineering Dartmouth Elements “elements” are the logical units of information in an XML document. An element consists of a start tag, optional text or other complete elements, followed by an end tag. Tony Blair is Prime Minister of GreatBritain.

Thayer School of Engineering Dartmouth Parsing this example... the p element, that contains the entire example (the person element, the text “ is ”, the function element, the text “ of ”, and the location element); the person element, that contains the text “Tony Blair”; the function element, that contains the text “Prime Minister”; the location element, that contains the country element; and the country element, that contains the text “Great Britain”.

Thayer School of Engineering Dartmouth Element “tree”

Thayer School of Engineering Dartmouth Syntax errors President Habibe Tags must be nested properly. eg... President Habibe

Thayer School of Engineering Dartmouth Syntax.... An XML document must have only one “root” element.... The following example fixes the problem by including both the a and b elements within a new x root element:...

Thayer School of Engineering Dartmouth Syntax.... polar bear This example will cause a parser error because an XML processor considers a and A to be separate elements, so the start and end tags do not match. Case sensitive!!! XML has a special empty-element tag that represents both the start tag and the end tag: Stuff More stuff. In this example, “ ” represents both the start and the end of the hr element; equivalent to “ ”

Thayer School of Engineering Dartmouth Attributes In addition to marking the beginning of an element, XML start tags also provide a place to specify attributes. An attribute specifies a single property for an element, using a name/value pair. One very well known example of an attribute is href in HTML: Yahoo! In this example, the content of the a element is the text “Yahoo!”; the attribute href provides extra information about the element (in this case, the Web page to load when a user selects the link).

Thayer School of Engineering Dartmouth Attributes Every attribute assignment consists of two parts: the attribute name (for example, href), and the attribute value (for example, Some rules : Attribute names in XML (unlike HTML) are case sensitive: HREF and href refer to two different XML attributes. You may not provide two values for the same attribute in the same start tag. This is wrong:.... Attribute names should never appear in quotation marks, but attribute values must always appear in quotation marks in XML (unlike HTML) using the " or ' characters....

Thayer School of Engineering Dartmouth References A reference allows you to include additional text or markup in an XML document. References always begin with the character “&” (which is specially reserved) and end with the character “;”. XML has two kinds of references: entity references An entity reference, like “&”, contains a name (in this case, “amp”) between the start and end delimiters. The name refers to a predefined string of text and/or markup, like a macro in the C or C++ programming languages. character references A character references, like “&”, contains a hash mark (“#”) followed by a number. The number always refers to the Unicode code for a single character, such as 65 for the letter “A” or 233 for the letter “é”, or 8211 for an en-dash.

Thayer School of Engineering Dartmouth Predeclared References Character Predeclared Entities & & < < > > " " ' &apos;

Thayer School of Engineering Dartmouth DTD’s.... This the syntax of an XML document. The structure (elements, etc) of an XML document are specified by a “schema”. If an XML document adheres to a prespecified schema, it is valid....ie the syntax is compliant with the schema. Schemas are specified by DTD’s or XML Schema. We’ll look at both DTD’s and XML Schema next.

Thayer School of Engineering Dartmouth Different types of DTD’s Internal DTD - inside.xml file External DTD - file with.dtd extension “SYSTEM” (private) vs “PUBLIC” Local extensions,rules can be added to external reference and override the external DTD.

Thayer School of Engineering Dartmouth Using a DTD from within an.xml... Naming DTD’s using Formal Public Identifiers (FPI’s)..... Next class....structure of the DTD and XML Schema.

Thayer School of Engineering Dartmouth Defining elements Elements name and company must be defined elsewhere, before, after or externally. means name occurs at least once, company zero or more times. + means at least once, ? means zero or one, * means zero or more so (name,name,name+) means at least three time, etc.

Thayer School of Engineering Dartmouth XMl Tutorials and References Let’s find a few….. XML Parser in Visual Studio