XML Fundementals XML vs.. HTML XML vs.. HTML XML Document (elements vs. attributes) XML Document (elements vs. attributes) XML and RDBMS XML and RDBMS.

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

Inside an XSLT Processor Michael Kay, ICL 19 May 2000.
CG0119 Web Database Systems Parsing XML: using SimpleXML & XSLT.
XML: Extensible Markup Language
UFCE8V-20-3 Information Systems Development 3 (SHAPE HK) Lecture 12 Extensible Stylesheet Language Transformations : XSLT.
XSLT (eXtensible Stylesheet Language Transformation) 1.
XSL XSLT and XPath 11-Apr-17.
1 CP3024 Lecture 9 XML revisited, XSL, XSLT, XPath, XSL Formatting Objects.
XSLT Stylesheets Some more advanced examples (adapted from the Edinburgh LT site)
Inside Data Access with SQLXML: Architecture Guide Rolandas Gricius MCT, MCSE, MCSD Adapted From.
XML Parsing Using Java APIs AIP Independence project Fall 2010.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 13-1 COS 346 Day 25.
XSL Concepts Lecture 7. XML Display Options What can XSL Transformations do? generation of constant text suppression of content moving text (e.g., exchanging.
Chapter 14 Database Connectivity and Web Technologies
September 15, 2003Houssam Haitof1 XSL Transformation Houssam Haitof.
XSL Transformations Transforming XML document into other (XML) documents 1XSL Transformations.
SQL Server 2000 and XML Erik Veerman Consultant Intellinet Business Intelligence.
Manohar – Why XML is Required Problem: We want to save the data and retrieve it further or to transfer over the network. This.
PHP and XML TP2653 Advance Web Programming. PHP and XML PHP5 – XML-based extensions, library and functionalities (current XAMPP PHP version is )
.NET and XML (or XML in.NET) David Oguns Matt Harding.
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.
By: Shawn Li. OUTLINE XML Definition HTML vs. XML Advantage of XML Facts Utilization SAX Definition DOM Definition History Comparison between SAX and.
Chapter 12 Creating and Using XML Documents HTML5 AND CSS Seventh Edition.
XML – Extensible Markup Language Sivakumar Kuttuva & Janusz Zalewski.
Sheet 1XML Technology in E-Commerce 2001Lecture 6 XML Technology in E-Commerce Lecture 6 XPointer, XSLT.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 XML Taken from Chapter 7.
XML – Extensible Markup Language XML eXtensible – add to language. Markup – delimit info using tags. Language – a way to express info.
IS432 Semi-Structured Data Lecture 5: XSLT Dr. Gamal Al-Shorbagy.
Presentation XML. NET SEMINAR By: Siddhant Ahuja (SID)
XML and its applications: 4. Processing XML using PHP.
ASP.NET and XML Presented By: Shravan S. Mylavarapu 1.
School of Computing and Management Sciences © Sheffield Hallam University To understand the Oracle XML notes you need to have an understanding of all these.
IT420: Database Management and Organization XML 21 April 2006 Adina Crăiniceanu
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.
Session II Chapter 2 – Chapter 2 – XSLhttp://
Extensible Markup and Beyond
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.
Intro. to XML & XML DB Bun Yue Professor, CS/CIS UHCL.
CITA 330 Section 6 XSLT. Transforming XML Documents to XHTML Documents XSLT is an XML dialect which is declared under namespace "
XSLT Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
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.
1 Introduction  Extensible Markup Language (XML) –Uses tags to describe the structure of a document –Simplifies the process of sharing information –Extensible.
McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Applying eXtensible Style Sheets (XSL) Ellen Pearlman Eileen Mullin Programming.
1 Overview of XSL. 2 Outline We will use Roger Costello’s tutorial The purpose of this presentation is  To give a quick overview of XSL  To describe.
CS 157B: Database Management Systems II February 11 Class Meeting Department of Computer Science San Jose State University Spring 2013 Instructor: Ron.
COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 4 1COMP9321, 15s2, Week.
Dom and XSLT Dom – document object model DOM – collection of nodes in a tree.
XSLT. XSLT stands for Extensible Stylesheet Language Transformations XSLT is used to transform XML documents into other kinds of documents. XSLT can produce.
More XML XPATH, XSLT CS 431 – February 23, 2005 Carl Lagoze – Cornell University.
Martin Kruliš by Martin Kruliš (v1.1)1.
 XML derives its strength from a variety of supporting technologies.  Structure and data types: When using XML to exchange data among clients, partners,
D Copyright © 2004, Oracle. All rights reserved. Using Oracle XML Developer’s Kit.
XSLT, XML Schema, and XPath Matt McClelland. Introduction XML Schema ▫Defines the content and structure of XML data. XSLT ▫Used to transform XML documents.
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.
I Copyright © 2004, Oracle. All rights reserved. Introduction.
Beyond HTML: Extensible Markup Language (XML)
XML: Extensible Markup Language
XML Related Technologies
Displaying XML Data with XSLT
XML in Web Technologies
Database Processing with XML
Prepared for Md. Zakir Hossain Lecturer, CSE, DUET Prepared by Miton Chandra Datta
Introduction to Internet Programming
More Sample XML By Sadia Anjum.
XML Problems and Solutions
XML and its applications: 4. Processing XML using PHP
More XML XML schema, XPATH, XSLT
Unit 6 - XML Transformations
Presentation transcript:

XML Fundementals XML vs.. HTML XML vs.. HTML XML Document (elements vs. attributes) XML Document (elements vs. attributes) XML and RDBMS XML and RDBMS XML Schema (DTD; XSD) XML Schema (DTD; XSD) XPATH XPATH XSLT (XSL; XSLT) XSLT (XSL; XSLT) SYSTEM.XML SYSTEM.XML XSD Classes and Types XSD Classes and Types Serialization Process Serialization Process

Any need for re-query or sorting of existing data required a new round-trip to the server. HTML

HTML and XML are both “firewall friendly” XML separate data from presentation XML is not a markup language XML defines the data content and structure HTML vs. XML

Anatomy of XML Document Op-Centre Steve Pieczenik Design Patterns Erich Gamma Richard Helm Ralph Johnson Prolog Root Element NamespaceElementAttribute DATA / PCDATA

Creating XML Documents Messages Relational databases Server Pages Legacy systems Other XML documents XML document XML document

Op-Centre Steve Pieczenik Design Patterns Erich Gamma Design Patterns Ralph Johnson Design Patterns Ralph Johnson The hierarchical nature of XML Op-Centre Steve Pieczenik Design Patterns Erich Gamma Richard Helm Ralph Johnson 59.00

How would you? 1.Add new Author that has no book’s isbn yet. 2.Remove the ‘ ’ row but keep the author ‘ Steve Pieczenik ’. 3.Change the title ‘ Design Patterns ’ without having to do it in many places. SELECT Books.isbn, Books.title, Authors.name as 'author', Books.price FROM Books, BooksAuthors, Authors WHERE Books.isbn = BooksAuthors.isbn and BooksAuthors.AuthorID = Authors.AuthorID Hierarchical support in relational databases 1/2 ‘BooksAuthors’ table ‘Authors’ table ‘Books’ table

Hierarchical support in relational databases 2/2 Select Books.*, Authors.name as Authors from Books, BooksAuthors, Authors where Books.isbn = BooksAuthors.isbn and BooksAuthors.AuthorID = Authors.AuthorID order by Books.isbn for xml auto

XML Schema DTD (Old W3C standard, supported by all …) DTD (Old W3C standard, supported by all …) XDR (Microsoft only) XDR (Microsoft only) XSD (W3C standard as of May 2001) XSD (W3C standard as of May 2001) ELEMENTS DTD XDR / XSD Min Occurs Max Occurs ?01 11 *0* +1*

Bookstore DTD - Sample DEMO – Validating XML with DTD

Bookstore XSD - Sample Open Sample Open Sample Open Sample Open Sample

Using XSLT Capabilities An XSLT style sheet can perform a wide range of transformations An XSLT style sheet can perform a wide range of transformations Examples: Examples: Map one XML grammar to another Map one XML grammar to another Filter unwanted data Filter unwanted data Sort XML data Sort XML data Restructure an XML document Restructure an XML document Perform computations Perform computations

Transforming XML into a Different XML Grammar XML document XSLT style sheet + XSLT processor Different XML grammar Reid … Reid … <staff-member name="Reid" pay="91000"/> … <staff-member name="Reid" pay="91000"/> …

Transforming XML into HTML XML document XSLT style sheet + XSLT processor XHTML document (XML compliant) Reid … Reid … Reid … Reid …

What Is XPath? XPath maps an XML document to a tree of nodes XPath maps an XML document to a tree of nodes Use XPath expressions to identify, select, and manipulate nodes in an XML hierarchy Use XPath expressions to identify, select, and manipulate nodes in an XML hierarchy Use location paths to select nodes Use location paths to select nodes XPath operators and functions XPath operators and functions

Why Use XPath? In XSLT style sheets, for pattern matching In SQL Server 2000, to address result-set nodes In XPointer, to link documents together System.xml to select nodes programmatically XML XPath

Using XSLT on the Server Apply a stylesheet to a document on the server Apply a stylesheet to a document on the server Transform between different schemas Transform between different schemas Merge data sources Merge data sources Conversion based on business processes and requirements Conversion based on business processes and requirements Convert XML into well-formed HTML Convert XML into well-formed HTML XSLT Different XML grammar XML Another server IE5 client Other browser HTML XML

SYSTEM.XML Hello System.Xml Hello System.Xml Quick overview - libraries tools and goals. Quick overview - libraries tools and goals. Integrating XML into your applications. Integrating XML into your applications. XML & Performance = streaming-based model XML & Performance = streaming-based model XML Transformation with performance in mind. XML Transformation with performance in mind. Demo Demo Optional: Accessing Raw SOAP Messages in ASP.NET Web Services Optional: Accessing Raw SOAP Messages in ASP.NET Web Services Hierarchical vs. Relational representation of data. Hierarchical vs. Relational representation of data. Why do we need them both. Why do we need them both. XML Integration with Relational Data. XML Integration with Relational Data. Demo Demo

Hello System.Xml System.Xml System.Xml System.Xml.Schema System.Xml.Schema System.Xml.Serialization System.Xml.Serialization System.Xml.XPath System.Xml.XPath System.Xml.Xsl System.Xml.Xsl Design Goals Compliance with the W3C standards Extensibility Pluggable architecture Performance Tight integration with ADO.NET Toolsxsd.exe Xml schema designer Data Adapter Wizard External tools

XML & Performance = streaming-based model XmlReader XmlReader Minimal caching for forward-only pull model parsing. Minimal caching for forward-only pull model parsing. XmlValidatingReader XmlValidatingReader Forward-only validation. Forward-only validation. XPathNavigator XPathNavigator cursor style navigation cursor style navigation minimizes node creation to a single virtual node minimizes node creation to a single virtual node yet provides random access to the document. yet provides random access to the document. does not require a complete node tree to be built in memory (DOM) does not require a complete node tree to be built in memory (DOM) XslTransform XslTransform Incremental streaming output. Incremental streaming output.

XML Transformation with performance in mind

Hierarchical vs. Relational representation of data

Discussion: Why do we need them both? Discussion: Why do we need them both?

XML Integration with Relational Data and ADO.NET

When to synchronize an XmlDataDocument with a DataSet When to load XML directly into a DataSet XPath queries are needed over data in the DataSet. Queries of data in the DataSet are easier using SQL than XPath Preservation of element ordering in the source XML is critical. Preservation of element ordering in the source XML is not critical. White space and formatting preservation in the source XML is critical. White space between elements and formatting does not need to be preserved in the source XML.

Synchronizing a DataSet with an XmlDataDocument Sample Code …

Serialization Process Classes used by the default Serialization Process Classes used by the default Serialization Process Classes used with Serialized Streams, File Stream, Memory Stream, Net Stream Classes used with Serialized Streams, File Stream, Memory Stream, Net Stream Binary Formatter Binary Formatter SOAP Formatter SOAP Formatter De-serialization De-serialization

XSD Classes and Types Using xsd.exe to generate schema from classes Using xsd.exe to generate schema from classes Using xsd.exe to generate classes from schema Using xsd.exe to generate classes from schema XSD Types XSD Types Demo Demo

Review XML vs.. HTML XML vs.. HTML XML Document (elements vs. attributes) XML Document (elements vs. attributes) XML and RDBMS XML and RDBMS XML Schema (DTD; XSD) XML Schema (DTD; XSD) XPATH XPATH XSLT (XSL; XSLT) XSLT (XSL; XSLT) SYSTEM.XML SYSTEM.XML XSD Classes and Types XSD Classes and Types Serialization Process Serialization Process