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.

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.
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.
XML XML What XML is and what it means to me as a Computer Scientist By: Derek Edwards CS 376 March 10, 2003.
INF201 Fall2010 Intro. to Info. Technologies Department of Informatics University at Albany – SUNY Original Source: w3schools.com Prepared by Xiao Liang,
CS 898N – Advanced World Wide Web Technologies Lecture 21: XML Chin-Chih Chang
IS 373—Web Standards Todd Will
Sistemi basati su conoscenza XML Prof. M.T. PAZIENZA a.a
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.
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.
XML Introduction By Hongming Yu Feb 6 th, Index Markup Language: SGML, HTML, XML An XML example Why is XML important XML introduction XML applications.
Introduction to XML Rashmi Kukanur. XML XML stands for Extensible Markup Language XML was designed to carry data XML and HTML designed with different.
Introducing XHTML: Module B: HTML to XHTML. Goals Understand how XHTML evolved as a language for Web delivery Understand the importance of DTDs Understand.
Introduce of XML Xiaoling Song CS157A. What is XML? XML stands for EXtensible Markup Language XML stands for EXtensible Markup Language XML is a markup.
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 XSL. ECA 228 Internet/Intranet Design I XSL basics W3C standards for stylesheets – CSS – XSL: Extensible Markup.
Pemrograman Berbasis WEB XML part 2 -Aurelio Rahmadian- Sumber: w3cschools.com.
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.
XML Anisha K J Jerrin Thomas. Outline  Introduction  Structure of an XML Page  Well-formed & Valid XML Documents  DTD – Elements, Attributes, Entities.
What is XML? XML stands for EXtensible Markup Language
Introduction to XML cs3505. References –I got most of this presentation from this site –O’reilly tutorials.
CREATED BY ChanoknanChinnanon PanissaraUsanachote
1Computer Sciences Department Princess Nourah bint Abdulrahman University.
Pemrograman Berbasis WEB XML -Aurelio Rahmadian- Sumber: w3cschools.com.
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.
XML Technologies Surekha Akula
CISC 3140 (CIS 20.2) Design & Implementation of Software Application II Instructor : M. Meyer Address: Course Page:
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.
1 © Netskills Quality Internet Training, University of Newcastle Introducing XML © Netskills, Quality Internet Training University.
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.
These Questions are copied from
 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,
Session IV Chapter 9 – XML Schemas
XML TUTORIAL Portions from w3 schools By Dr. John Abraham.
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.
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.
CIS 275—Web App Dev I XML. 2 Introduction to XMLXML XML stands for ________________________. HTML was designed to display data. XML was designed to _________.
Windows Presentation Foundation (WPF) Chapter 16 Dr. Abraham.
Waqas Anwar Next SlidePrevious Slide. Waqas Anwar Next SlidePrevious Slide XML XML stands for EXtensible Markup Language.
XML Documents Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University Elements Attributes Comments PI Document.
1 Introduction  Extensible Markup Language (XML) –Uses tags to describe the structure of a document –Simplifies the process of sharing information –Extensible.
XML Instructor: Charles Moen CSCI/CINF XML  Extensible Markup Language  A set of rules that allow you to create your own markup language  Designed.
XML EXtensible Markup Language. Agenda Introduction to XML XML Rules XML Elements XML Attributes XML Validation XML Exercises XML Namespaces XML CDATA.
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
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 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.
ASHIMA KALRA  INTRODUCTION OF XML INTRODUCTION OF XML  XML FEATURES XML FEATURES  XML SYNTAX XML SYNTAX  XML ELEMENTS XML ELEMENTS  XML ATTRIBUTES.
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.
C Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Introduction to XML Standards.
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.
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.
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.
Unit 4 Representing Web Data: XML
Chapter 7 Representing Web Data: XML
Presentation transcript:

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 HTML disadvantages: – loose standards – fixed markup – maintenance

ECA 228 Internet/Intranet Design I XML markup language / meta language consists only of data and markup HTML was designed to display data and focus on how it looks. XML was designed to describe data, and focus on what it is. HTML is about displaying information. XML is about describing information.

ECA 228 Internet/Intranet Design I What is XML? XML – stands for EXtensible Markup Language – is a markup language much like HTML – was designed to describe data – tags are not predefined – you define your own tags – uses a DTD of XML Schema to describe the data – is designed to be self_descriptive

ECA 228 Internet/Intranet Design I HTML Example Bubba Jenna Reminder Remember, we’re looking for mushrooms tomorrow.

ECA 228 Internet/Intranet Design I XML Example Bubba Jenna Reminder We’re looking for mushrooms tomorrow. HTML is about displaying information. XML is about describing information.

ECA 228 Internet/Intranet Design I XML uses XML was designed to store, carry, and exchange data XML was not designed to display data in web pages – HTML to structure the document – CSS to add presentational elements – XML to provide content to exchange data between otherwise incompatible applications

ECA 228 Internet/Intranet Design I XML Example 1 st line is the XML declaration 2 nd line describes the root element next 4 lines are child elements of the root last line defines the end of the root element Bubba Jenna Reminder We’re looking for mushrooms tomorrow.

ECA 228 Internet/Intranet Design I XML Syntax All XML elements must have a closing tag – in HTML the following is legal – in XML it is illegal to omit the closing tag – empty tags must use opening/closing tag This is a paragraph.

ECA 228 Internet/Intranet Design I XML Syntax cont … XML tags are case sensitive This is incorrect This is correct

ECA 228 Internet/Intranet Design I XML Syntax cont … XML tags must be nested properly This is incorrect This is correct

ECA 228 Internet/Intranet Design I XML Syntax cont … XML documents must have a root element – root element contains all other elements – other elements may have child elements nested properly within them...

ECA 228 Internet/Intranet Design I XML Syntax cont … Attribute values must always be quoted – elements may contain attributes in name=value pairs Bubba Jenna Reminder We’re looking for mushrooms tomorrow.

ECA 228 Internet/Intranet Design I XML Syntax With XML, white space is preserved – HTML ignores all white space, but one renders as – XML preserves all white space Hi there, my name is Bubba.

ECA 228 Internet/Intranet Design I XML Syntax cont … XML converts CR / LF to LF – a new line is always stored as a LF ( line feed ) Windows apps store new lines as CR LF Unix apps store new lines as LF Mac apps store new lines as CR ( Carriage Return ) – XML converts all to LF

ECA 228 Internet/Intranet Design I XML Syntax cont … XML comments – XML comments are the same as in HTML

ECA 228 Internet/Intranet Design I XML Syntax cont … XML special symbols – to include an ampersand, a less than sign, or a greater than sign as data, use character entities CODE REPRESENTS &ampersand <less than sign >greater than sign &apos;apostrophe "quote

ECA 228 Internet/Intranet Design I XML Elements XML elements can contain different types of content – element: contains other XML elements – text: contains only text – mixed: contains both text and other elements – empty: contains no content, such as the HTML tag

ECA 228 Internet/Intranet Design I Naming XML Elements Certain rules must be followed when naming elements – can contain letters, numbers, and some characters (underscore, hyphen, period, colon), however, caution should be used when using hyphen, period, or colon – must start with a letter, underscore, or colon (namespace), but no numbers – may not contain spaces – may not begin with the letters xml – is case sensitive

ECA 228 Internet/Intranet Design I Naming XML Elements cont … separate words are often separated by an underscore Caution when using a hyphen, period, or colon first_name first.name first-name

ECA 228 Internet/Intranet Design I Naming XML Elements cont … names can be as long as necessary keep names descriptive but simple XML document often has a corresponding database – element names may match filed names the_title_of_the_book book_title

ECA 228 Internet/Intranet Design I XML Attributes XML elements may contain attributes – attributes provide information which is not necessarily part of the data attributes are used in the opening tag of an element attribute values must always be quoted

ECA 228 Internet/Intranet Design I XML Attributes cont … if an attribute value contains double quotes, place single quotes around the value if an attribute uses single quotes or an apostrophe, place double quotes around the value

ECA 228 Internet/Intranet Design I XML Attributes cont … in many instances, attributes can be written as a child element Sophie’s Choice

ECA 228 Internet/Intranet Design I XML Attributes cont … if the information being provided by the attribute seems like data, use it as an element if the information clearly is not data, but can be used to classify or categorize the element, use an attribute 12/30/2003

ECA 228 Internet/Intranet Design I XML Attributes cont … meta data ( data about data ) should be stored as an attribute actual data should be stored as an element

ECA 228 Internet/Intranet Design I Validation well-formed – a document that adheres to correct XML syntax valid – a document that is well-formed and conforms to a DTD DTD – Document Type Definition – defines a structure with a list of legal elements XML Schema – alternative to DTD

ECA 228 Internet/Intranet Design I Namespace combined XML documents risk name conflicts … …

ECA 228 Internet/Intranet Design I Namespace cont … create a prefix to distinguish similarly named elements … …

ECA 228 Internet/Intranet Design I Namespace cont … XML namespace – takes the form of a URL – based upon a unique domain name – namespace must have a unique & persistent name begin with domain name add descriptive information, as if it is a path in the URL

ECA 228 Internet/Intranet Design I Namespace cont … the URL does not necessarily point to a particular document a URL is used because it is unique a namespace must be declared before it can be used namespace declaration has a specific structure xmlns:namespace_prefix=“namespace_url”

ECA 228 Internet/Intranet Design I Namespace cont … prefix the xml elements with namespace name to declare a default namespace, omit the prefix … …

ECA 228 Internet/Intranet Design I Namespace cont … override a default namespace by specifying a prefix …

ECA 228 Internet/Intranet Design I Namespace cont … 3 reasons not to use the URL itself as a prefix 1. URL’s make use of the colon 2. very difficult to type and read 3. URL’s can contain special characters not permitted in XML … … …

ECA 228 Internet/Intranet Design I Formatting XML although it is possible to format XML with CSS, it is not recommended rather than CSS, the preferred way to format XML is with XSL ( EXtensible Stylesheet Language ) XSL can be used to transform XML into HTML before it is sent to the browser

ECA 228 Internet/Intranet Design I XML Data Island Microsoft proprietary technology not supported by the W3C specification XML Data Islands use an unofficial tagset Data Islands can embed XML directly into an HTML document

ECA 228 Internet/Intranet Design I XML Data Island cont … note that the tag is an HTML element, not an XML element Bubba Jenna Reminder Remember, we’re looking for mushrooms.

ECA 228 Internet/Intranet Design I XML Data Island cont … if the Data Island is a separate document, it can be embedded with a reference to the document

ECA 228 Internet/Intranet Design I Data Binding Microsoft proprietary technology not supported by the W3C Data Islands can be bound to HTML elements, such as an HTML table – load a Data Island from an external XML file – bind the table to the Data Island with a data source attribute ( datasrc ) – bind the table elements to the XML data with a data field attribute ( datafld ) inside a span tag, inside each table cell

ECA 228 Internet/Intranet Design I Data Binding note that the datafld matches the element name