Introduction to XML 1. XML XML started out as a standard data exchange format for the Web Yet, it has quickly become the fundamental instrument in the.

Slides:



Advertisements
Similar presentations
Ali Alshowaish w3schools. XML documents use a self-describing and simple syntax: The first line is the XML declaration. It defines the XML version (1.0)
Advertisements

Website Design.
SPECIAL TOPIC XML. Introducing XML XML (eXtensible Markup Language) ◦A language used to create structured documents XML vs HTML ◦XML is designed to transport.
XML XML What XML is and what it means to me as a Computer Scientist By: Derek Edwards CS 376 March 10, 2003.
IS 373—Web Standards Todd Will
Sistemi basati su conoscenza XML Prof. M.T. PAZIENZA a.a
DECO 3002 Advanced Technology Integrated Design Computing Studio Tutorial 5 – XML Basic School of Architecture, Design Science and Planning Faculty of.
Sistemi basati su conoscenza XML Prof. M.T. PAZIENZA a.a
Introduction to XML: Yong Choi CSU Bakersfield.
Upgrading to XHTML DECO 3001 Tutorial 1 – Part 1 Presented by Ji Soo Yoon 19 February 2004 Slides adopted from
HTML Elements. HTML documents are defined by HTML elements.
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.
Creating a Simple Page: HTML Overview
Pemrograman Berbasis WEB XML part 2 -Aurelio Rahmadian- Sumber: w3cschools.com.
Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh University.
XML introduction to Ahmed I. Deeb Dr. Anwar Mousa  presenter  instructor University Of Palestine-2009.
 Introduction to XML Introduction to XML  Features of XML Features of XML  Syntax of XML Syntax of XML  Syntax rules of XML document Syntax rules.
What is XML? XML stands for EXtensible Markup Language
CREATED BY ChanoknanChinnanon PanissaraUsanachote
Pemrograman Berbasis WEB XML -Aurelio Rahmadian- Sumber: w3cschools.com.
CS 299 – Web Programming and Design Introduction to HTML.
XML 1 Enterprise Applications CE00465-M XML. 2 Enterprise Applications CE00465-M XML Overview Extensible Mark-up Language (XML) is a meta-language that.
HTML INTRODUCTION, EDITORS, BASIC, ELEMENTS, ATTRIBUTES.
XHTML. Introduction to XHTML What Is XHTML? – XHTML stands for EXtensible HyperText Markup Language – XHTML is almost identical to HTML 4.01 – XHTML is.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
 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,
Tutorial 1: XML Creating an XML Document. 2 Introducing XML XML stands for Extensible Markup Language. A markup language specifies the structure and content.
Electronic Commerce COMP3210 Session 4: Designing, Building and Evaluating e-Commerce Initiatives – Part II Dr. Paul Walcott Department of Computer Science,
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?.
CSC 330 E-Commerce Teacher Ahmed Mumtaz Mustehsan Ahmed Mumtaz Mustehsan GM-IT CIIT Islamabad GM-IT CIIT Islamabad CIIT Virtual Campus, CIIT COMSATS Institute.
XML eXtensible Markup Language. Topics  What is XML  An XML example  Why is XML important  XML introduction  XML applications  XML support CSEB.
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.
CIS 275—Web App Dev I XML. 2 Introduction to XMLXML XML stands for ________________________. HTML was designed to display data. XML was designed to _________.
1 Creating Web Pages Part 1. 2 OVERVIEW: HTML-What is it? HyperText Markup Language, the authoring language used to create documents on the World Wide.
XML Documents Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University Elements Attributes Comments PI Document.
WEB APPLICATION DEVELOPMENT For More visit:
XML 2 Prepared by / Nael Alian Uinverity of Palestine Re. 1.
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 –
XML EXtensible Markup Language. Agenda Introduction to XML XML Rules XML Elements XML Attributes XML Validation XML Exercises XML Namespaces XML CDATA.
Web Technologies COMP6115 Session 4: Adding a Database to a Web Site Dr. Paul Walcott Department of Computer Science, Mathematics and Physics University.
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.
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.
The eXtensible Markup Language (XML). Presentation Outline Part 1: The basics of creating an XML document Part 2: Developing constraints for a well formed.
What it is and how it works
XML for Text Markup An introduction to XML markup.
Lecture: Web Design Assis. Prof. Freshta Hanif Ehsan Faculty of Computer Science Kabul Polytechnic University Spring Semester
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.
Internet & World Wide Web How to Program, 5/e © by Pearson Education, Inc. All Rights Reserved.
Internet & World Wide Web How to Program, 5/e. © by Pearson Education, Inc. All Rights Reserved.2.
225 City Avenue, Suite 106 Bala Cynwyd, PA , phone , fax presents… XML Syntax v2.0.
ASHIMA KALRA  INTRODUCTION OF XML INTRODUCTION OF XML  XML FEATURES XML FEATURES  XML SYNTAX XML SYNTAX  XML ELEMENTS XML ELEMENTS  XML ATTRIBUTES.
2.1 XHTML. Motto High thoughts must have high language. –Aristophanes.
XML CSC1310 Fall HTML (TIM BERNERS-LEE) HyperText Markup Language  HTML (HyperText Markup Language): December  Markup  Markup is a symbol.
IS444: Modern software development tools Dr. Azeddine Chikh.
XML. HTML Before you continue you should have a basic understanding of the following: HTML HTML was designed to display data and to focus on how data.
Dave Salinas. What is XML? XML stands for eXtensible Markup Language Markup language, like HTML HTML was designed to display data, whereas XML was designed.
Introduction to XML Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
VCE IT Theory Slideshows by Mark Kelly study design By Mark Kelly, vceit.com, Begin.
XML Introduction to XML Extensible Markup Language.
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.
XML intro. 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.
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.
14 XML.
Presentation transcript:

Introduction to XML 1

XML XML started out as a standard data exchange format for the Web Yet, it has quickly become the fundamental instrument in the development of Web-based online information services and electronic commerce applications Today, many applications on the Web use XML for hosting and storing large amounts of structured data. XML standard is set and maintained by W3C ( 2

What is XML? XML stands for eXtensible Markup Language. XML is a markup language much like HTML. XML was designed to describe data; XML tags are not predefined in XML. You must define your own tags. XML is a portable, and an open standard (i.e., nonproprietary or fee-free) technology for data storage and exchange. XML Provides the ability to describe data in an open text-based format and deliver it using standard http protocol. 3

The main difference between XML and HTML XML is not a replacement for HTML. XML and HTML were designed with different goals. XML was designed to describe data and to focus on what data is. HTML was designed to display data and to focus on how data looks. 4

Creating a simple XML Document We want to create a XML document for the following information Kim Name Kim 1234 South Street, NY, USA Home Address 1234 South Street, NY, USA Vice President Job Title Vice President $175,000 Salary $175,000 5

XML Example Kim 34 South Street, NY, USA Vice President $175,000 XML documents are stored as files with the.xml extension An XML document contains:  Text that represents the data.  Elements that specify its structure. 6

XML Elements XML elements are similar to HTML elements, they consist of  Start tag  End tag  Content between the two tags Example: Kim 7

Tagging Data in XML $175,000 Considering the content only, it is not possible to understand what $175,000 stands for. The tag name Salary inform us that the content represents a salary. Similarly, an XML element might be tagged as gender, birth date, price,… XML is extensible, users create their own tags, the tag names are neither predefined nor limited. In HTML, the author of HTML documents can only use tags that are defined in the HTML standard (like and.....). 8

XML – Element Nesting Elements may be nested to any depth to provide structured data The previous XML document is modified to include more elements under the element. Kim 34 South Street NY USA Vice President $175,000 9

XML – Element Nesting Elements may be repeated to represent a list of values. Ali ….. 10 element repeated to list all students in a class

All XML elements must be properly nested Nesting XML tags improperly is a syntax error. In XML all elements must be properly nested within each other like this: Ali In HTML some elements can be improperly nested within each other like this: This text is bold and italic NOTE: It is considered a bad coding practice to nest tags improperly in HTML. 11

XML Root Element A valid XML document contains a single root element, which constitutes the top-level of nesting. The first tag in an XML document is the root tag. All the other elements must be nested within the root element …

XML Element Names XML element names can be of any length and can contain letters, digits, underscores, hyphens and periods. XML element names must begin with either a letter or an underscore, and they should not begin with “ xml ” in any combination of uppercase and lowercase letters, as this is reserved for use in the XML standards. Using a white-space character in an XML element name is an error. Examples of invalid element names: $175,000 13

All XML elements must have a closing tag In an XML document, each start tag must have a matching end tag; omitting either tag is an error. In HTML some elements do not have to have a closing tag. The following code is legal in HTML: This is a paragraph This is another paragraph I n XML both tags must be included: Ali

XML tags are case sensitive Unlike HTML, XML tags are case sensitive. Using different cases for the start tag and end tag names for the same element is a syntax error. With XML, the tag is different from the tag. Opening and closing tags must therefore be written with the same case: This is correct in XML 15

White Space in Element In XML, the white space in element is not truncated. He is my friend The above two XML statements are different. 16

XML - Attributes XML elements can have attributes, just like HTML. Attributes provide additional information about an element. Example: $175, ,000 17

Attribute used as primary key Mathew XML Guide Saleem Java Handbook

Attribute Quotes With XML, it is illegal to omit quotation marks around attribute values. Incorrect attribute use: Either single or double quotes can be used If the attribute value itself contains double quotes you can use single quotes. 19

White Space in Attribute In XML, the white space in the attribute is truncated or ignored. Ali The above two XML statements are the same. 20