Presentation is loading. Please wait.

Presentation is loading. Please wait.

XML, CFMX CFML & SQL XML Kevin Penny, MMCP

Similar presentations


Presentation on theme: "XML, CFMX CFML & SQL XML Kevin Penny, MMCP"— Presentation transcript:

1 XML, CFMX CFML & SQL XML Kevin Penny, MMCP kevin@hotgigs.com

2 What is XML? ► Animal, vegetable, or mineral? ► Best reference: www.w3schools.com www.w3schools.com ► XML stands for EXtensible Markup Language ► XML was designed to describe data ► XML can be used to Share Data/Store Data, Create New Languages ► XML is designed to be self-descriptive   ► ►  Golden Retriever  Golden Retriever ► ►  

3 XML Uncovered   ► ►  Golden Retriever  Golden Retriever ► ►   ELEMENT ATTRIBITE XML Declaration ROOT ELEMENT

4 Rules of the Road ► XML is cAsE Sensitive ► Elements must have a closing tag ► Elements must be properly nested ► Attribute values must be quoted ► All XML documents must have a root element

5 CFML and XML ► New great XML functions  XMLParse(xmlDocument) ► Creates a tree structure of the XML document as an array of structures ► Data can come from a database query, a file on the server, an http request etc.  XMLSearch(xmlDocument, xPathString) ► Used to navigate/search an xml document using elements (walking the nodes)  XMLFormat(string) ► Used to escape special XML characters in a string so that it is safe to use with XML ► ‘ “ &  XMLTransform(xmlDocument,xslString) ► Applies an XSLT to an XML document  XMLNew() or <CFXML ► Creates an XML Document ► Great Reference  http://www.how2cf.com/files/papers/cfxml.pdf

6 CFML XML IA ► CFML XML in Action  Let’s Dive in  Example ► Create ► Parse ► Search ► Extract ► Cfug/Index.cfm

7

8 SQL XML ► Microsoft SQL Server 2000’s support for XML  Creating queries that create an XML output ► FOR XML Cause  Inputting XML to a procedure that can manipulate the XML Document and put the data into a table etc. ► i.e. Complex form data can be passed to a stored procedure and manipulated ► sp_xml_preparedocument ► OPENXML

9 SQL XML meets CFML XML ► Example  SQL Query as XML  SQL OPENXML Example in a Stored Procedure  CFML Call to the Procedure inserting the XML Document

10

11

12

13 Questions? ► DTD’s? ► XPath ► XSLT ► Schemas ► SQL OPENXML

14 References ► CFML XML  http://www.how2cf.com/files/papers/cfxml.pdf http://www.how2cf.com/files/papers/cfxml.pdf ► XML  www.w3schools.com www.w3schools.com


Download ppt "XML, CFMX CFML & SQL XML Kevin Penny, MMCP"

Similar presentations


Ads by Google