Well Formed XML The basics. A Simple XML Document Smith Alice.

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

Defining XML The Document Type Definition. Document Type Definition text syntax for defining –elements of XML –attributes (and possibly default values)
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.
An Introduction to XML Based on the W3C XML Recommendations.
© De Montfort University, XML – a meta language Howell Istance and Peter Norris School of Computing De Montfort University.
XML 6.3 DTD 6. XML and DTDs A DTD (Document Type Definition) describes the structure of one or more XML documents. Specifically, a DTD describes:  Elements.
XML Document Type Definitions ( DTD ). 1.Introduction to DTD An XML document may have an optional DTD, which defines the document’s grammar. Since the.
XML Study-Session: Part I Writing a XML Document.
A Technical Introduction to XML Transparency No. 1 XML quick References.
XML Why is XML so popular? –It’s flexible –It enables you to create your own documents with elements (tags) that you define Non-XML example: This is a.
Extensible Markup Language XML MIS 520 – Database Theory Fall 2001 (Day) Lecture 14.
XML: New or Old? XML was not an extention of HTML That already existed! SGML (ISO 8879) XML was a simplification of SGML  80 / 20 rule  (80% of the features.
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.
Tutorial 11 Creating XML Document
XML Primer. 2 History: SGML vs. HTML vs. XML SGML (1960) XML(1996) HTML(1990) XHTML(2000)
XML Fundamentals Transparency No. 1 XML Fundamentals Cheng-Chia Chen November 2004.
COS 381 Day 14. Agenda Questions?? Resources Source Code Available for examples in Text Book in Blackboard
Document Type Definitions. XML and DTDs A DTD (Document Type Definition) describes the structure of one or more XML documents. Specifically, a DTD describes:
XML Basics Hope Greenberg Center for Teaching & Learning.
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.
CREATED BY ChanoknanChinnanon PanissaraUsanachote
1/14 ITApplications XML Module Session 2: Using and Creating XML Documents.
XML - DTD. The building blocks of XML documents Elements, Tags, Attributes, Entities, PCDATA, and CDATA.
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.
XML Extensible Markup Language. What is XML? ● meta-markup language ● a language for defining a family of languages ● semantic/structured mark-up language.
XML Syntax - Writing XML and Designing DTD's
 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,
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?.
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.
E0262 – MIS – Multimedia Storage Techniques XML (Extensible Markup Language  XML is a markup language for creating documents containing structured information.
XML 2nd EDITION Tutorial 1 Creating An Xml Document.
IS432: Semi-Structured Data Dr. Azeddine Chikh. 3. XML Fundamentals.
XML Fundamentals, Namespaces Data Warehousing Lab. 박유림.
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.
IS432 Semi-Structured Data Lecture 2: DTD Dr. Gamal Al-Shorbagy.
XML 2 Prepared by / Nael Alian Uinverity of Palestine Re. 1.
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
McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Understanding How XML Works Ellen Pearlman Eileen Mullin Programming the.
XML Introduction. What is XML? XML stands for eXtensible Markup Language XML stands for eXtensible Markup Language XML is a markup language much like.
Chapter 2: Well-Formed XML. Chapter 2 Objectives How to create SML elements using start- tags and end-tags How to further describe elements with attributes.
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.
Unit 10 Schema Data Processing. Key Concepts XML fundamentals XML document format Document declaration XML elements and attributes Parsing Reserved characters.
1 herbert van de sompel CS 502 Computing Methods for Digital Libraries Cornell University – Computer Science Herbert Van de Sompel
225 City Avenue, Suite 106 Bala Cynwyd, PA , phone , fax presents… XML Syntax v2.0.
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 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.
XML DTD. XML Validation XML with correct syntax is "Well Formed" XML. XML validated against a DTD is "Valid" XML.
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:
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.
WELL- FORMEDNESS CH 6. Objective Well-formedness rules Text in XML Elements and Tags in Atributes Entity references CDATA sections Comments Unicode XML1.1.
HTML is about making documents. Simple Code for Simple Layout My Document This is an example HTML document First paragraph Second paragraph This is the.
The XML Language.
Allyson Falkner Spokane County ISD
Review of XML IST 421 Spring 2004 Lecture 5.
Presentation transcript:

Well Formed XML The basics

A Simple XML Document Smith Alice

XML Tags Starting Tag Ending Tag Alice

Empty Elements Some tags contain no data Often this is because all their content is in the form of attributes These can be closed in the regular way with an opending and closing tag, or they can end with />

Case Sensitivity XML is case sensitive does not match with the closing tag or This makes it easier for programs to parse

XML Trees Employees Employee Name Lastname “Smith Firstname “Alice” Status ( dept=“Accounting” Paytype=“Salary”)

Parents and Children In the diagram on the previous slide, the employee element is the parent to the name and the status elements name is the parent of the firstname and lastname elements firstname and lastname are children of the name element. Etc.

Root Element All XML documents must have a root element that encloses all the other elements (like HTML in an HTML document)... Employees is the root element in our xml example

Attributes An element can have 0 to several attributes. The values of an attribute must be enclosed in quotes (single or double)

XML Names Element and attribute names follow the same rules XML names my contain any alphanumeric letter They can also include any of three punctuation marks ◦ The hyphen – ◦ The underscore __ ◦ The period.

XML Names Cont. XML names must begin with a letter or the underscore The cannot begin with a number There is no limit to the length of the names but they cannot contain spaces Any string beginning with “xml” (lower or upper case) is reserved

Entity References XML entities are almost identical to HTML entities. You use them to substitute for illegal or potentially confusing characters XML defines 5 entities & < > " &apos;

CDATA Sections When you need to quote large sections of say HTML code you can use CDATA sections rather than entities for each character <![CDATA[ ]]>

Comments XML comments are just like HTML comments They begin with You cannot put a comment in an element And the double -- is forbidden in the text of the comment since it would confuse the parser

Processing Instructions Processing instructions contain information to be used by other applications such as browsers Processing instructions begin with The XML declaration is a not a processing instruction

XML Declaration or Prolog Version (currently 1.0 or 1.1) Standalone (“yes” means there is no DTD or schema definition for this document) Encoding (the particular Unicode or ISO character encoding)

Checking for Well-Formedness Every start tag must have an end tag or be self closed Elements may not overlap (proper nesting) There must be exactly one root element Attribute values must be quoted An element may not have two attributes with the same name Comments and processing instructions may not appear inside elements No unescaped < or & signs may occur in the element’s or attribute’s character data