Coding With XML Andrew Schwabe

Slides:



Advertisements
Similar presentations
Web Development & Design Foundations with XHTML
Advertisements

XML and Enterprise Computing. What is XML? Stands for “Extensible Markup Language” –similar to SGML and HTML –document “tags” are used to define content.
An Introduction to XML Based on the W3C XML Recommendations.
Leveraging XML with ColdFusion Jeff Tapper June 2004.
1 Introduction to XML. XML eXtensible implies that users define tag content Markup implies it is a coded document Language implies it is a metalanguage.
Project 1 Introduction to HTML.
3 November 2008CIS 340 # 1 Topics To define XML as a technology To place XML in the context of system architectures.
CS 898N – Advanced World Wide Web Technologies Lecture 21: XML Chin-Chih Chang
1 XML: Document Type Definitions 2 Road Map  Introduction to DTDs  What’s a DTD?  Why are they important?  What will we cover?  Our First DTD 
Sistemi basati su conoscenza XML Prof. M.T. PAZIENZA a.a
1st Project Introduction to HTML.
Chapter ONE Introduction to HTML.
4/20/2017.
August Chapter 1 - Introduction Learning XML by Erik T. Ray Slides were developed by Jack Davis College of Information Science and Technology Radford.
Chapter 16 The World Wide Web. 2 The Web An infrastructure of information combined and the network software used to access it Web page A document that.
16-1 The World Wide Web The Web An infrastructure of distributed information combined with software that uses networks as a vehicle to exchange that information.
CREATED BY ChanoknanChinnanon PanissaraUsanachote
Example XML Applications/Languages. Objectives To Review uses of XML To investigate some Language applications of XML XHTML RSS WML Web Services.
Copyright © 2012 Accenture All Rights Reserved.Copyright © 2012 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are.
ColdFusion’s XML Capabilities Maryland CFUG April 12, 2005 Presented by Doug Ward.
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.
Another PillowTalk Presentation  2004 Dynamic Systems, Inc. Introduction to XML for SOA Lee H. Burstein,
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.
Introduction. Document Structure Overview  XML declaration (prolog)  Document type declaration  Root element (namespace)  Document header  Document.
 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.
XML A web enabled data description language 4/22/2001 By Mark Lawson & Edward Ryan L’Herault.
Softsmith Infotech XML. Softsmith Infotech XML EXtensible Markup Language XML is a markup language much like HTML Designed to carry data, not to display.
Utilizing XML in ColdFusion MX by Attila Domokos.
XML 2nd EDITION Tutorial 1 Creating An Xml Document.
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.
Lecture 16 Introduction to XML Boriana Koleva Room: C54
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.
An Introduction to XML Sandeep Bhattaram
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 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.
XML – Its Role and Use Ben Forta Senior Product Evangelist, Macromedia.
COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 4 1COMP9321, 15s2, Week.
WDDX Case Study: Building a Cross CFUG Search April Fleming.
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 –
XML CSC1310 Fall HTML (TIM BERNERS-LEE) HyperText Markup Language  HTML (HyperText Markup Language): December  Markup  Markup is a symbol.
HTML Concepts and Techniques Fifth Edition Chapter 1 Introduction to HTML.
Unit 3 — Advanced Internet Technologies Lesson 10 — Introduction to XHTML.
Introduction to XML Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
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.
XP 1Creating Web Pages with XML Tutorial 1 New Perspectives on XML Tutorial 1 – Creating an XML Document.
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.
HTML PROJECT #1 Project 1 Introduction to HTML. HTML Project 1: Introduction to HTML 2 Project Objectives 1.Describe the Internet and its associated key.
Extensible Markup Language (XML) Pat Morin COMP 2405.
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.
XML: Extensible Markup Language
Unit 4 Representing Web Data: XML
XML Related Technologies
Chapter 1 Introduction to HTML.
XML QUESTIONS AND ANSWERS
Project 1 Introduction to HTML.
XML in Web Technologies
Chapter 7 Representing Web Data: XML
Creating an XML Document
What is XML?.
Chapter 16 The World Wide Web.
Introduction to World Wide Web
CSE591: Data Mining by H. Liu
Allyson Falkner Spokane County ISD
Presentation transcript:

Coding With XML Andrew Schwabe

June 27 th - 30 th 2007www.cfunited.com What This Presentation Is Introduction to XML using ColdFusion How and where XML is used in “real” life (at least a programmers life) How to read, use and create well- formed XML documents

June 27 th - 30 th 2007www.cfunited.com Who this presentation is for You like ColdFusion You know how to use structures and arrays You need to (or hope some day to) use XML in your applications

June 27 th - 30 th 2007www.cfunited.com About Andrew Schwabe ColdFusion developer since version 3 Worked for web development company for 9 years CTO with IEXP Software Lead Architect for FusionDox IDM Document Management Software (CF based document management)

June 27 th - 30 th 2007www.cfunited.com What is XML ?

June 27 th - 30 th 2007www.cfunited.com What is XML ? Wikipedia says: Extensible Markup Language (XML) is a general-purpose markup language. It is classified as an extensible language because it allows its users to define their own tags. Its primary purpose is to facilitate the sharing of data across different information systems, particularly via the Internet. XML is meant to be relatively human- readable.

June 27 th - 30 th 2007www.cfunited.com What is XML ? eXtensible Markup Language XML is a standard for creating markup languages that describe the structure of data In some form or another (i.e. GML etc.) it has been around since the 70’s

June 27 th - 30 th 2007www.cfunited.com What is XML ? eXtensible Markup Language XML is a standard for creating markup languages that describe the structure of data In some form or another (i.e. GML etc.) it has been around since the 70’s This isn’t a history lesson. We have Google

June 27 th - 30 th 2007www.cfunited.com In Simplest Terms An XML “document” is a tree of nested elements. Elements use tag syntax to describe information Elements can contain other elements, attributes and text

June 27 th - 30 th 2007www.cfunited.com

June 27 th - 30 th 2007www.cfunited.com Benefits of Storing Data in XML XML is designed for storing JUST data Forces you to separate data from formatting (good practice!) Human Readable (for the most part) Highly portable between different development languages and operating systems

June 27 th - 30 th 2007www.cfunited.com Related Technologies Hyper Text Markup Language (HTML) RSS  Really Simple Syndication  Rich Site Syndication  Rich Syndication Standard  Rich Site Summary

June 27 th - 30 th 2007www.cfunited.com Related (cont.) XSLT (Extensible Style sheet Language) WDDX (Web Distributed Data Exchange) Web Services – SOAP (Simple Object Access Protocol) MXML, and many more…

June 27 th - 30 th 2007www.cfunited.com Where Do We Use XML ? Web Services and RSS Electronic Data Interchange (EDI) Online XML Services (i.e.. UPS, FedEx, USPS) Storing complex structures of data in files and database fields

June 27 th - 30 th 2007www.cfunited.com Where Do We Use XML ? Exchanging data with Flash Movies (Not using Flash Remoting) Reading and Storing content for use by other systems

June 27 th - 30 th 2007www.cfunited.com A Practical Example

June 27 th - 30 th 2007www.cfunited.com A Practical Example Company X Has an E-Commerce Website Hosted by an ISP Orders are taken online and stored in the web database An outside Fulfillment firm needs to have order data to package and ship orders

June 27 th - 30 th 2007www.cfunited.com A Practical Example (cont.) The goal is to maintain security and eliminate double entry (and thus removing human error) Solution: Push orders from the website in XML format and import into fulfillment system

June 27 th - 30 th 2007www.cfunited.com

June 27 th - 30 th 2007www.cfunited.com Anatomy of an XML Document

June 27 th - 30 th 2007www.cfunited.com Anatomy of an XML Document Prolog Body  Elements  Attributes  CDATA  Special Characters

June 27 th - 30 th 2007www.cfunited.com Anatomy of an XML Document 512 Goshen Road Bordell OH } Prolog } Body

June 27 th - 30 th 2007www.cfunited.com Anatomy of an XML Document 512 Goshen Road Bordell OH Attribute Element XML Text

June 27 th - 30 th 2007www.cfunited.com Anatomy of an XML Document Arm & Hammer <![CDATA[ This text will be treated as literal, and can contain reserved unescaped characters. ]]> Escaped reserved character CDATA Block

June 27 th - 30 th 2007www.cfunited.com Important Terminology

June 27 th - 30 th 2007www.cfunited.com Important Terminology “Document Type Definition (DTD)” : A DTD defines strict rules for what can be contained in a specific type of XML Document

June 27 th - 30 th 2007www.cfunited.com Important Terminology “Well Formed”: An XML document is well formed if it adheres to all the standard rules for XML (i.e. only one root element, no invalid characters, etc.)

June 27 th - 30 th 2007www.cfunited.com Important Terminology “Valid”: An XML document is valid if it is well formed, and also if it adheres to the rules of it’s DTD

June 27 th - 30 th 2007www.cfunited.com Important Terminology NOTE: As a general rule, XML documents do not specifically have to have a DTD XML Documents can be well formed without a DTD and be usable

June 27 th - 30 th 2007www.cfunited.com SerializationSerialization The process of converting textual data into an XML object is called deserialization The process of converting an XML object back into text is called serialization Web Services handle serialization and deserialization automatically

June 27 th - 30 th 2007www.cfunited.com ColdFusion Support ColdFusion MX 6 ColdFusion MX 7 ColdFusion MX 8 BlueDragon Offers Similar and Enhanced functionality

June 27 th - 30 th 2007www.cfunited.com XML Basic Functions XmlNew XmlParse XmlElemNew XmlSearch XmlValidate

June 27 th - 30 th 2007www.cfunited.com Reading an XML Document Once an XML document is converted to an XML Object in ColdFusion, it becomes a collection of structures and arrays The process of serializing local, transfer data, deserialize remotely is the key to XML

June 27 th - 30 th 2007www.cfunited.com Traversing XML Looping over XML Structure

June 27 th - 30 th 2007www.cfunited.com Creating a New XML Doc Cheating

June 27 th - 30 th 2007www.cfunited.com Creating a New XML Doc Cheating Build Using XmlNew and Arrays and Nodes

June 27 th - 30 th 2007www.cfunited.com Storing and Retrieving XML CFFILE CFHTTP Web Services

June 27 th - 30 th 2007www.cfunited.com Using WDDX Web Distributed Data Exchange Serializing Arrays and Structures Deserializing WDDX Packets

June 27 th - 30 th 2007www.cfunited.com Using WDDX Benefits Easily convert existing CF constructs into XML Deserializing WDDX data results in a standard CF construct

June 27 th - 30 th 2007www.cfunited.com XML or WDDX ? Who will need to access the data? Think about the future WDDX is not very widely adopted

June 27 th - 30 th 2007www.cfunited.com Validating XML XMLValidate Optional: specify a DTD Returns “errors” – determine if the XML Document is “Valid” Returns “fatalerrors” – determine if the XML Document is “Well Formed”

June 27 th - 30 th 2007www.cfunited.com XML Search

June 27 th - 30 th 2007www.cfunited.com ExamplesExamples XML Site Navigation Create the definition of a navigation system in XML Read the XML and dynamically build the navigation system

June 27 th - 30 th 2007www.cfunited.com Managed Website Prefs Website settings stored in XML Web page to allow users to modify settings

June 27 th - 30 th 2007www.cfunited.com Fedex Rate Lookup Retrieve dynamic rate service quotes using UPS online tools

June 27 th - 30 th 2007www.cfunited.com Tips and Tricks Dealing with HTTP Compression and Web Services

June 27 th - 30 th 2007www.cfunited.com Where to look next Google XML Support in SQL Server 2005

June 27 th - 30 th 2007www.cfunited.com Coding With XML - Updated Stuff Copy of updated presentation and sample files are posted at: Contact me at: (courtesy of engrish.com)