230 likes | 363 Views
Embracing the Value of XML in Institutional Research. Jim Few Center for Institutional Effectiveness Kennesaw State University http://ie.kennesaw.edu Association for Institutional Research 2005 Forum San Diego, CA. Agenda. What is XML? Why should you care? What should you know?
E N D
Embracing the Value of XML in Institutional Research Jim Few Center for Institutional Effectiveness Kennesaw State University http://ie.kennesaw.edu Association for Institutional Research 2005 Forum San Diego, CA
Agenda • What is XML? • Why should you care? • What should you know? • How can you use XML?
What is XML? • The eXtensible Markup Language (XML) is a non-proprietary standard that provides a format for describing structured data. • XML was designed to describe, store, carry, and exchange data in a unified manner. • XML provides the ability to liberate data from proprietary data silos. • XML separates data from presentation. W3C: http://www.w3schools.com/xml/xml_whatis.asp
What XML is Not • A replacement for HTML • A replacement for relational databases • A programming language (e.g. Java, C++, VB) • Terse • A panacea
Text File Format ID Lname Mname Fname Gender 83492 Clark F Betty F 89430 Bhatt Soham M 94032 Jones T John M 48392 Klein R Kim F
Why Should You Care? • Standard (Non-proprietary) • Extensible • Flexible • Easy to share • Web-friendly • Separates data from presentation • Far richer than flat text files • Makes the structure of the document trivial, leaving the implementation and dialect up to you
What Should You Know? • XML syntax is strict • XML documents provide a self-describing syntax • All XML elements must have a closing tag • XML tags are case sensitive • All XML elements must be properly nested • All XML documents must have a root element W3C: http://www.w3schools.com/xml/xml_syntax.asp
Who Supports XML? • Microsoft • IBM • Oracle • SAS • Adobe • SAP • Sun Microsystems • BEA • Business Objects • W3C • Computer Associates • PeopleSoft Anyone who is a player in the computing world
Oracle PDF Crystal MS Excel MS Access MS Word HTML Data Silos
Oracle DB2 MS Word Crystal MS Excel MS Access SQL Server Dreamweaver XML Facilitates Data Sharing XML
Text Versus XML Student Record Nick Roberts 0001462395 143 Main St Clemson, SC 29634 26 3.4 3.8 <Student> <LName>Roberts</LName> <FName>Nick</FName> <ID>0001462395</ID> <Street>143 Main St</Street> <City>Clemson</City> <State>SC</State> <ZipCode>29634</ZipCode> <Age>26</Age> <GPACumulative>3.4</GPACumulative> <GPATerm200508>3.8</GPATerm200508> </Student>
HTML Versus XML <Student> <LName>Roberts</LName> <FName>Nick</FName> <ID>0001462395</ID> <Street>143 Main St</Street> <City>Clemson</City> <State>SC</State> <ZipCode>29634</ZipCode> <Age>26</Age> </Student> <b>Student Record</b> <br> <br> Nick Roberts<br> 0001462395<br> 143 Main St<br> Clemson, SC <br> 29634<br> 26
What is XML Schema? • An XML schema defines: • Elements that can appear in a document • Attributes that can appear in a document • Which elements are child elements • The order of child elements • The number of child elements • Whether an element can be null or must include data • Data types for elements and attributes • Default and fixed values for elements and attributes W3C: http://www.w3schools.com/schema/schema_why.asp
So, What is XML Schema? • A schema describes the structure of an XML document using XML • An XML schema manages the expectations of those sharing an XML document • A schema enforces business constraints and ensures data validation • For example, we can create a standard definition for social security number (data type is string, format=###-##-####, required field, etc.). W3C: http://www.w3schools.com/schema/schema_intro.asp
What is XSL? • XSL stands for eXtensible Stylesheet Language • Think of XSL as a set of languages that can: • Transform XML into XHTML • Filter and sort XML data • Format XML data based on the data value (e.g. displaying negative numbers in red) • Output XML data to different media (e.g. web browsers, screens, print, or voice) W3C: http://www.w3schools.com/xsl/xsl_languages.asp
XSL Example <xsl:stylesheetversion="1.0"xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <html> <body> <strong>Student Record</strong> <br/> <br/> <xsl:value-of select="Student/FName"/> <xsl:value-of select="Student/LName"/> <br/> <xsl:value-of select="Student/Street"/> <br/> <xsl:value-of select="Student/City"/>, <xsl:value-of select="Student/State"/> <xsl:value-of select="Student/ZipCode"/> <br/> <xsl:value-of select="Student/Age"/> </body> </html> </xsl:template> </xsl:stylesheet>
How Can You Use XML? • Share data across disparate applications, platforms and networks • Abstract periodic data structure changes • Single data source satisfies multiple uses • Aggregate data from multiple sources into one file • Render data from complex queries without latency • Snapshot/Census data captures • Shift database hit to off-peak times • Manage security concerns • Impress those reading your resume
Database XML Application XML Workflows Database XML Document XML Document Schema Validation Print Document Web Browser Stylesheet Transformation
XML Workflow Example Database XML Generator Web Browser ASP.NET XML Document XSL Stylesheet
Oracle DB2 XML MS Access SQL Server Multiple Data Sources
The End Questions? Comments? Thank You jfew@kennesaw.edu Center for Institutional Effectiveness Kennesaw State University http://ie.kennesaw.edu Thanks to Nick Roberts for being a dear friend, professional colleague, and valuable contributor to this presentation. Thanks to Randy Hinds for the use of his PowerPoint graphics.