Computer Information Systems Information Systems California State University Los Angeles Jongwook Woo CIS 561 Design of an E-Commerce Site XML Validation.

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

SPECIAL TOPIC XML. Introducing XML XML (eXtensible Markup Language) ◦A language used to create structured documents XML vs HTML ◦XML is designed to transport.
XSL XSLT and XPath 11-Apr-17.
XML XML What XML is and what it means to me as a Computer Scientist By: Derek Edwards CS 376 March 10, 2003.
1 CP3024 Lecture 9 XML revisited, XSL, XSLT, XPath, XSL Formatting Objects.
3 November 2008CIS 340 # 1 Topics To define XML as a technology To place XML in the context of system architectures.
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
CSE 190: Internet E-Commerce Lecture 17: XML, XSL.
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.
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 This material is based heavily on the tutorial by the same name at
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.
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.
Chapter 12 Creating and Using XML Documents HTML5 AND CSS Seventh Edition.
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.
Introduction to XML cs3505. References –I got most of this presentation from this site –O’reilly tutorials.
WPF chapter 15 Dr. John Abraham Professor UTPA. WPF –an introduction WPF provides a single platform capable of handling graphics, audio and video. WPF.
CREATED BY ChanoknanChinnanon PanissaraUsanachote
1Computer Sciences Department Princess Nourah bint Abdulrahman University.
IS432 Semi-Structured Data Lecture 5: XSLT Dr. Gamal Al-Shorbagy.
XML eXtensible Markup Language w3c standard Why? Store and transport data Easy data exchange Create more languages WSDL (Web Service Description Language)
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.
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.
XHTML,XML M.Abdullah Mrian. What is the XHTML Why XHTML ?
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,
XML TUTORIAL Portions from w3 schools By Dr. John Abraham.
How do I use HTML and XML to present information?.
CIS 375—Web App Dev II XSL. 2 XSL Introduction XSL stands for _____________________________. XSL is the language used for manipulating and displaying.
Presentation Topic: XML and ASP Presented by Yanzhi Zhang.
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.
Computer Information Systems Information Systems California State University Los Angeles Jongwook Woo CIS 561 Design of an E-Commerce Site Introduction.
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.
1 Dr Alexiei Dingli XML Technologies XML. 2 XML stands for EXtensible Markup Language XML is a markup language much like HTML XML was designed to carry.
Waqas Anwar Next SlidePrevious Slide. Waqas Anwar Next SlidePrevious Slide XML XML stands for EXtensible Markup Language.
1 Introduction  Extensible Markup Language (XML) –Uses tags to describe the structure of a document –Simplifies the process of sharing information –Extensible.
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.
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.
XML EXtensible Markup Language. Agenda Introduction to XML XML Rules XML Elements XML Attributes XML Validation XML Exercises XML Namespaces XML CDATA.
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 Introduction. Markup Language A markup language must specify What markup is allowed What markup is required How markup is to be distinguished from.
1 Tutorial 11 Creating an XML Document Developing a Document for a Cooking Web Site.
CHAPTER 15 WPF Windows Presentation Foundation Dr. John Abraham Professor, UTPA.
IS446: Internet Software Development Dr. Azeddine Chikh.
XML Presented by Kushan Athukorala. 2 Agenda XML Overview Entity References Elements vs. Atributes XML Validation DTD XML Schema Linking XML and CSS XSLT.
COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 4 1COMP9321, 15s2, Week.
Web Technologies Lecture 4 XML and XHTML. XML Extensible Markup Language Set of rules for encoding a document in a format readable – By humans, and –
ASHIMA KALRA  INTRODUCTION OF XML INTRODUCTION OF XML  XML FEATURES XML FEATURES  XML SYNTAX XML SYNTAX  XML ELEMENTS XML ELEMENTS  XML ATTRIBUTES.
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.
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.
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.
Prepared for Md. Zakir Hossain Lecturer, CSE, DUET Prepared by Miton Chandra Datta
Presentation transcript:

Computer Information Systems Information Systems California State University Los Angeles Jongwook Woo CIS 561 Design of an E-Commerce Site XML Validation Jongwook Woo, PhD California State University, Los Angeles Computer Information Systems Department

CSLA Computer Information Systems Information Systems Jongwook Woo 2 XML Validation nXML Validation nXML Validator nXML Browsers nXML Viewing nXML Data Island nXML Parser

CSLA Computer Information Systems Information Systems Jongwook Woo 3 Well Formed XML Documents nA "Well Formed" XML document has correct XML syntax. mA "Well Formed" XML document is a document that conforms to the XML syntax rules that were described in the previous chapters: –XML documents must have a root element –XML elements must have a closing tag –XML tags are case sensitive –XML elements must be properly nested –XML attribute values must always be quoted

CSLA Computer Information Systems Information Systems Jongwook Woo 4 Valid XML Documents nA "Valid" XML document is a "Well Formed" XML document, mAnd, which also conforms to the rules of a Document Type Definition (DTD) or Schema: nXML DTD mA DTD defines the legal elements of an XML document. mThe purpose of a DTD is to define the legal building blocks of an XML document. nXML Schema mXML Schema is an XML based alternative to DTD. mW3C supports an alternative to DTD called XML Schema.

CSLA Computer Information Systems Information Systems Jongwook Woo 5 XML Validator nErrors in XML documents will stop your XML program. mThe W3C XML specification states that a program should not continue to process an XML document if it finds an error. nWith HTML, possible to create documents with lots of errors mlike when you forget an end tag mOne of the main reasons that HTML browsers are so big and incompatible, – they have their own ways to figure out what a document should look like when they encounter an HTML error. mWith XML this should not be possible –All XML S/Ws are compatible nXML Validator mhttp://

CSLA Computer Information Systems Information Systems Jongwook Woo 6 XML Browser Support nNearly all major browsers have support for XML and XSLT. nMozilla Firefox mSince version 1.0.2, Firefox has support for XML and XSLT (and CSS) nInternet Explorer mSince version 6, Internet Explorer supports XML, Namespaces, CSS, XSLT, and XPath. mNote: Internet Explorer 5 also has XML support, but the XSL part is NOT compatible with the official W3C XSL Recommendation!

CSLA Computer Information Systems Information Systems Jongwook Woo 7 XML Browser Support (Cont’d) nOpera mSince version 9, Opera has support for XML and XSLT (and CSS). Version 8 supports only XML + CSS. nMozilla mMozilla includes Expat for XML parsing and has support to display XML + CSS. Mozilla also has some support for Namespaces. mMozilla is available with an XSLT implementation. nNetscape mSince version 8, Netscape uses the Mozilla engine, and therefore it has the same XML / XSLT support as Mozilla.

CSLA Computer Information Systems Information Systems Jongwook Woo 8 XML Viewing nLook at this XML file: note.xmlnote.xml mNote: Do not expect XML files to be formatted like HTML documents! nViewing an Invalid XML File mIf an erroneous XML file is opened, the browser will report the error. mLook at this XML file: note_error.xmlnote_error.xml nOther XML Examples mAn XML CD catalog This is the author’s father's CD collection, stored as XML dataAn XML CD catalog mAn XML plant catalog This is a plant catalog from a plant shop, stored as XML data.An XML plant catalog mA Simple Food Menu This is a breakfast food menu from a restaurant, stored as XML data.A Simple Food Menu

CSLA Computer Information Systems Information Systems Jongwook Woo 9 XML Viewing (Cont’d) nWhy Does XML Display Like This? mXML documents do not carry information about how to display the data. mSince XML tags are "invented" by the author of the XML document, –browsers do not know if a tag like describes an HTML table or a dining table. nWithout any information about how to display the data, mmost browsers will just display the XML document as it is.

CSLA Computer Information Systems Information Systems Jongwook Woo 10 XML Displaying nWith CSS (Cascading Style Sheets) madd display information to an XML document. mhttp:// – nDisplaying XML with XSL (the eXtensible Stylesheet Language) mXSL is the preferred style sheet language of XML. mfar more sophisticated than CSS. – to transform XML into HTML before it is displayed by the browser – View the XML file, the XSL style sheet, and View the result.View the XML filethe XSL style sheetView the result

CSLA Computer Information Systems Information Systems Jongwook Woo 11 XML Displaying (Cont’d) nBelow is a fraction of the XML file. mThe second line,, links the XML file to the XSL file: Belgian Waffles $5.95 two of our famous Belgian Waffles 650

CSLA Computer Information Systems Information Systems Jongwook Woo 12 XML Data Island nXML data embedded into an HTML page mNote: only for Internet Explorer mXML document ("note.xml"): Tove Jani Reminder Don't forget me this weekend!

CSLA Computer Information Systems Information Systems Jongwook Woo 13 XML Data Island (Cont’d) nThen, in an HTML document, myou can embed the XML file previous with the tag. –The id attribute of the tag defines an ID for the data island, –and the src attribute points to the XML file to embed: mHowever, the embedded XML data is, up to this point, not visible for the user. –The next step is to format and display the data in the data island by binding it to HTML elements.

CSLA Computer Information Systems Information Systems Jongwook Woo 14 XML Data Island (Cont’d) nBind Data Island to HTML Elements membed an XML file called "cd_catalog.xml" into an HTML file. mView "cd_catalog.xml".View "cd_catalog.xml" – mThe HTML file looks like this:

CSLA Computer Information Systems Information Systems Jongwook Woo 15 XML Data Island (Cont’d) nExample explained: mThe datasrc attribute of the tag –binds the HTML table element to the XML data island. –refers to the id attribute of the data island. m tags cannot be bound to data, so we are using tags. –The tag allows the datafld attribute to refer to the XML element to be displayed. –In this case, it is datafld="ARTIST" for the element and datafld="TITLE" for the element in the XML file. –As the XML is read, additional rows are created for each element. nIf you are running IE 5.0 or higher, try it mhttp:// nAlso try this example, demonstrating,, and.this example mhttp://

CSLA Computer Information Systems Information Systems Jongwook Woo 16 XML Parser nExample: News in XML for real life … … nS/W myou will need an XML parser, –To read and update - create and manipulate - an XML document, mMSXML Parser for IE mXML Parser for Mozilla