XML Outline 1 XML 2 DTD.

Slides:



Advertisements
Similar presentations
Introduction to the Logical Structure of XML Documents Web Engineering, SS 2007 Tomáš Pitner, Michael Derntl.
Advertisements

XML: Extensible Markup Language
XML and Enterprise Computing. What is XML? Stands for “Extensible Markup Language” –similar to SGML and HTML –document “tags” are used to define content.
 Fundamentals of Web Design.  Describe the history and theory of XHTML  Understand the rules for creating valid XHTML documents  Apply a DTD to an.
Extensible Markup Language Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University.
Tutorial 9 Working with XHTML
XML e X tensible M arkup L anguage 1/23.
1 XML: Document Type Definitions 2 Road Map  Introduction to DTDs  What’s a DTD?  Why are they important?  What will we cover?  Our First DTD 
Valid XML documents (contd.) For example, if we wanted to turn the example well- formed XML document we have just seen into a valid document, we would.
XML Primer. 2 History: SGML vs. HTML vs. XML SGML (1960) XML(1996) HTML(1990) XHTML(2000)
Coypright (c) Ning Chen, Ph.D CPSC 425 Java Enterprise Application Programming Presented by Ning Chen, Ph.D. Chair/Professor Department of Computer.
Jennifer Widom XML Data XML Schema. Jennifer Widom XML Schema “Valid” XML Adheres to basic structural requirements  Also adheres to content-specific.
Jennifer Widom XML Data DTDs, IDs & IDREFs. Jennifer Widom DTDs, IDs & IDREFs “Well-Formed” XML Adheres to basic structural requirements Single root element.
Introduction to XML This material is based heavily on the tutorial by the same name at
Copyright © 2003 Pearson Education, Inc. Slide 2-1 Created by Cheryl M. Hughes, Harvard University Extension School — Cambridge, MA The Web Wizard’s Guide.
XP New Perspectives on XML Tutorial 4 1 XML Schema Tutorial – Carey ISBN Working with Namespaces and Schemas.
XP New Perspectives on XML Tutorial 3 1 DTD Tutorial – Carey ISBN
CREATED BY ChanoknanChinnanon PanissaraUsanachote
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 © 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.
Introduction. Document Structure Overview  XML declaration (prolog)  Document type declaration  Root element (namespace)  Document header  Document.
XML 1 Enterprise Applications CE00465-M XML. 2 Enterprise Applications CE00465-M XML Overview Extensible Mark-up Language (XML) is a meta-language that.
August Chapter 2 - Markup and Core Concepts Learning XML by Erik T. Ray Slides were developed by Jack Davis College of Information Science and Technology.
1 XHTML محمد احمدی نیا 2 Of 19 HTML vs XHTML  XHTML is a stricter and cleaner version of HTML.  by combining the strengths of HTML.
XHTML. Introduction to XHTML What Is XHTML? – XHTML stands for EXtensible HyperText Markup Language – XHTML is almost identical to HTML 4.01 – XHTML is.
XP 1 DECLARING A DTD A DTD can be used to: –Ensure all required elements are present in the document –Prevent undefined elements from being used –Enforce.
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.
Winter 2006Keller, Ullman, Cushing18–1 Plan 1.Information integration: important new application that motivates what follows. 2.Semistructured data: a.
CIS 275—Web App Dev I XML. 2 Introduction to XMLXML XML stands for ________________________. HTML was designed to display data. XML was designed to _________.
J2EE Overview Web Programming CSCI J2EE multi-tier architecture Servlet: Java class loaded into Web server JSP page: enhanced HTML page that is.
XML Documents Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University Elements Attributes Comments PI Document.
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.
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.
What it is and how it works
1 Tutorial 11 Creating an XML Document Developing a Document for a Cooking Web Site.
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.
Well Formed XML The basics. A Simple XML Document Smith Alice.
Representing data with XML SE-2030 Dr. Mark L. Hornick 1.
XP Tutorial 9New Perspectives on HTML and XHTML, Comprehensive 1 Working with XHTML Creating a Well-Formed Valid Document Tutorial 9.
 2003 Prentice Hall, Inc. All rights reserved Deploying a Web Application ( may include.war )
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.
CIS 228 The Internet 9/20/11 XHTML 1.0. “Quirks” Mode Today, all browsers support standards Compliant pages are displayed similarly There are multiple.
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.
Extensible Markup Language (XML) Pat Morin COMP 2405.
XML BASICS and more…. What is XML? In common:  XML is a standard, simple, self-describing way of encoding both text and data so that content can be processed.
CIS 228 The Internet 9/20/11 XHTML 1.0.
CITA 330 Section 3 XHTML.
Tutorial 9 Working with XHTML
Yaşar Tonta & Orçun Madran [yasartonta, Hacettepe University
Data Modeling II XML Schema & JAXB Marc Dumontier May 4, 2004
Session III Chapter 6 – Creating DTDs
Chapter 7 Representing Web Data: XML
Web Programming Maymester 2004
XML Data DTDs, IDs & IDREFs.
New Perspectives on XML
CSE591: Data Mining by H. Liu
14 XML.
Session II Chapter 6 – Creating DTDs
Allyson Falkner Spokane County ISD
Review of XML IST 421 Spring 2004 Lecture 5.
New Perspectives on XML
Presentation transcript:

XML Outline 1 XML 2 DTD

The xml doc ends with the closing tag of the root element. Lines 1-5 comprise the Prolog. Line 1 is the XML declaration. “version” & “encoding” are attributes. 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 3 <!DOCTYPE web-app 4 PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" 5 "http://java.sun.com/dtd/web-app_2_3.dtd "> 6 7 <web-app> 8 9 <!-- Servlet definitions --> 10 <servlet> 11 <servlet-name>welcome</servlet-name> 12 <servlet-class>WelcomeServlet</servlet-class> 13 </servlet> 14 15 <!-- Servlet mappings --> 16 <servlet-mapping> 17 <servlet-name>welcome</servlet-name> 18 <url-pattern>/welcome</url-pattern> 19 </servlet-mapping> 20 21 </web-app> Document Type Definition. Either a DTD or Schema is used by a parser to validate the xml doc. The Body of the xml doc starts with the root element. An element consists of a start tag, an end tag & everything in between. A comment. <servlet> is a child of the <web-app> element and a parent to <servlet-name> & <servlet-class>. Well-formed xml docs follow a strict parent-child hierarchy. The xml doc ends with the closing tag of the root element.

<. DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> DOCTYPE refers to web-app, the root element – this is the definition for this web-app document PUBLIC means the DTD is available on the Internet. Locally-stored DTDs would instead use the SYSTEM keyword, followed by the local path, e.g., “C:\Windows\Desktop\web-app_2_3.dtd” "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN“ is the “Formal Public Identifier” used with PUBLIC DTDs The dash ( - ) indicates the DTD has not been approved by a Standards body, such as ISO. Approved Standard DTDs use a plus sign here ( + ). Sun Microsystems, Inc. is the name of the owner who maintains the DTD. DTD is the document type and Web Application 2.3 is a label that describes the document. EN is the two-letter abbreviation for the language the DTD is written in. Here, it’s English. “http://java.sun.com/dtd/web-app_2_3.dtd“ specifies the URL where the parser may find a copy of the DTD. Let’s take a look at this DTD.