PART 1 XML Basics. Slide 2 Why XML Here? You need to understand the basics of XML to do much with Android All of they layout and configuration files are.

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.
XML: Extensible Markup Language
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.
USING ANDROID WITH THE INTERNET. Slide 2 Network Prerequisites The following must be included so as to allow the device to connect to the network The.
XHTML1 Building Document Structure. XHTML2 Objectives In this chapter, you will: Learn how to create Extensible Hypertext Markup Language (XHTML) documents.
XML CS 105. What is XML? XML stands for Extensible Markup Language. XML is a markup language like HTML. XML was designed to describe data. You must define.
XML Introduction What is XML –XML is the eXtensible Markup Language –Became a W3C Recommendation in 1998 –Tag-based syntax, like HTML –You get to make.
Tutorial 11 Creating XML Document
XML Primer. 2 History: SGML vs. HTML vs. XML SGML (1960) XML(1996) HTML(1990) XHTML(2000)
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
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.
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.
XP New Perspectives on XML Tutorial 4 1 XML Schema Tutorial – Carey ISBN Working with Namespaces and Schemas.
XML introduction to Ahmed I. Deeb Dr. Anwar Mousa  presenter  instructor University Of Palestine-2009.
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.
XML and XSL Institutional Web Management 2001: Organising Chaos.
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.
Introduction to XML Eugenia Fernandez IUPUI. What is XML? From the World Wide Web Consortium (W3C) The Extensible Markup Language (XML) is the universal.
XML A Single Entity. xml a single entity Objectives Objectives :  understand the data model  describe the XML Document  describe the XML Schema  describe.
1 © Netskills Quality Internet Training, University of Newcastle Introducing XML © Netskills, Quality Internet Training University.
XHTML1 Building Document Structure Chapter 2. XHTML2 Objectives In this chapter, you will: Learn how to create Extensible Hypertext Markup Language (XHTML)
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.
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,
Electronic Commerce COMP3210 Session 4: Designing, Building and Evaluating e-Commerce Initiatives – Part II Dr. Paul Walcott Department of Computer Science,
XML 2nd EDITION Tutorial 1 Creating An Xml Document.
1 XML An Overview Roger Debreceny University of Hawai`i Skip White University of Delaware XBRL Workshop, August 2006.
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 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.
Accessing Data Using XML CHAPTER NINE Matakuliah: T0063 – Pemrograman Visual Tahun: 2009.
Web Technologies COMP6115 Session 4: Adding a Database to a Web Site Dr. Paul Walcott Department of Computer Science, Mathematics and Physics University.
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
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.
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.
Jennifer Widom XML Data Introduction, Well-formed XML.
XML A Language Presentation. Outline 1. Introduction 2. XML 2.1 Background 2.2 Structure 2.3 Advantages 3. Related Technologies 3.1 DTD 3.2 Schemas and.
Unit 3 — Advanced Internet Technologies Lesson 11 — Introduction to XSL.
Introduction to XML XML – Extensible Markup Language.
XML CSC1310 Fall HTML (TIM BERNERS-LEE) HyperText Markup Language  HTML (HyperText Markup Language): December  Markup  Markup is a symbol.
Unit 3 — Advanced Internet Technologies Lesson 10 — Introduction to XHTML.
Basic HTML Document Structure. Slide 2 Goals (XHTML HTML5) XHTML Separate document structure and content from document formatting HTML 5 Create a formal.
C Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Introduction to XML Standards.
Web Services. XML Namespaces, Schemas XML processing. Week 2.
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.
1 Extensible Stylesheet Language (XSL) Extensible Stylesheet Language (XSL)
Extensible Markup Language (XML) Pat Morin COMP 2405.
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.
The Purpose of XML Namespaces
Unit 4 Representing Web Data: XML
XML QUESTIONS AND ANSWERS
The XML Language.
Chapter 7 Representing Web Data: XML
Introducing HTML & XHTML:
XML Data Introduction, Well-formed XML.
Allyson Falkner Spokane County ISD
Presentation transcript:

PART 1 XML Basics

Slide 2 Why XML Here? You need to understand the basics of XML to do much with Android All of they layout and configuration files are XML files

Slide 3 Overview XML is a very simple language The entire specification is only about 35 printed pages XML IS CASE SENESITIVE

Slide 4 The XML Document At the heart of XML is the XML document An XML document is a logical entity rather than a physical one One logical document can be stored in different physical files locally and on the Web and assembled somehow A well-formed subset of an XML document is called a document fragment An XML document contains markup (tags) and data Looks like HTML without predefined tags Elements contain 0, 1 or many attributes

Slide 5 Elements (Introduction) XML tags resemble HTML tags but they are not predefined That is, you give names to tags just as you give names to variables and other identifiers Starting tags appear as Ending tags appear as Empty elements (elements without data) can appear as XML elements MUST have an ending tag A starting and ending tag (along with any text) makes up an element

Slide 6 Elements (Nesting) Elements can be nested These are hierarchical nodes Elements MUST be nested correctly though A child element must completely reside in its parent element There must be exactly one and only one root element

Slide 7 Elements (Nesting – Example) 42 Root element is Nested element is

Slide 8 XML Attributes (Introduction) Elements can have one or more attributes Same rules as HTML Attributes appear after the starting tag name One element cannot have two attributes of the same name One element can have many attributes though

Slide 9 XML Attributes (Syntax 1) Attributes appear as key=value pairs An attribute must have both a key and a value Attribute keys do not appear in quotation marks Attribute values must appear in quotation marks Remember, single and double quotes are interchangeable A space separates each key=value pair Attributes can appear in starting and empty element tags but cannot appear in an ending tag For a given element, each attribute key must differ

Slide 10 XML Attributes (Example) In the following example, id and size are attributes of the element 42

Slide 11 Comparing Attributes and Elements The following 2 documents are (roughly) equivalent Bill Bill

PART 2 XML Namespaces

Slide 13 Namespace Caveats XML namespaces are the source of criticism and confusion XML namespaces are the source of many myths.NET namespaces and XML namespaces are not the same thing In fact, they have nothing to do with each other

Slide 14 The Problem of Name Ambiguity Names can be ambiguous When we say “Las Vegas” do we mean “Las Vegas, Nevada” or “Las Vegas, New Mexico” How many cities have the name “Springfield”? When we say address, do we mean street address or Internet address Name ambiguity occurs when two XML documents have elements of the same name but with different meanings (context)

Slide 15 The Problem of Name Ambiguity (Example) 123 Oak street The meaning of differs between the two contexts

Slide 16 The Purpose of XML Namespaces (1) They eliminate name ambiguity in element names between documents Namespaces answer the question “Are we talking about the same thing?” XML namespaces were released about 1 year after XML itself was released

Slide 17 The Purpose of Namespaces (2) According to the W3C namespace specification: We envision applications of Extensible Markup Language (XML) where a single XML document may contain elements and attributes (here referred to as a "markup vocabulary") that are defined for and used by multiple software modules.

Slide 18 Implementation of XML Namespaces XML namespaces use URIs (IRIs) to qualify element names This allows us to use the same element name with a different URI thereby qualifying the element name The URI is just a globally unique name Formally, XML namespaces define a vocabulary or universe of names

Slide 19 The Implementation of Namespaces (1) Namespace names are defined through ‘special’ attributes Any attribute starting with the prefix xmlns: is considered a prefix defining attribute The prefix following the attribute is the local abbreviation for the namespace The prefix name has no relevance although there are common naming conventions The attribute value is a unique URI

Slide 20 XML Namespace Example (Android) The prefix android is given to The prefix tools is given to

Slide 21 Namespaces (Quotable Quotes) What Does a Namespace URL Locate? There is nothing at all at the end of a namespace URI, except perhaps a 404 Not Found error

Slide 22 Namespaces (Myths) IT’S NOT NECESSARILY A WEB SITE IT’S NOT A REFERENCE TO A PROGRAM ON THE WEB IT’S NOT A POINTER TO A RESOURCE IT’S JUST A NAME

Slide 23 Applications using XML namespaces XML namespaces are widely used in The Schema Definition Language (XSDL) The Extensible Stylesheet Language (XSL) The can represent a vocabulary

Slide 24 Characteristics of Namespace URIs (Example) The following URIs ARE different: And so are the following: