Documente Academic
Documente Profesional
Documente Cultură
November, 2001
Greg Barnes Nelson CEO and Founder ThotWave Technologies Cary, NC Thinking Data
Introduction
Why XML?
XML is to Data like HTML is to Presentation
Outline
Definitions Technology Challenges How XML Can Help Understanding What XML is (and isnt) Reading and Writing XML with SAS The Future of XML and SAS
November, 2001
XML 101
What it is
Markup language Language that helps define other languages
</customer-data>
November, 2001
Technology Challenges
Multiple Views of the Same Data
Resume Example 1 Resume Example 2 Resume Example 3
Application Integration
Data Feeds from External Application Example
Information Optimization
Parsing large amounts of text for patterns - Example
Meaningful Searches
Provides context for searching
Granular Updates
Part of the XML document can be updated
Technology Optimization
XML and XSL for transformations on the fly
November, 2001
Writing XML
A variety of tools can write XML documents The syntax is document / language specific Schemas help define the language that is generated Standards are loosely defined:
Oracle OIMDBM Doc Book
November, 2001
Data Step
Data _null_; file outxml; set sampdata.cust10 (where =(custnum=137000)) NOBS=Lst; length gender $6. marital_status $11.; addr1=htmlencode(addr1); addr2=htmlencode(addr2); if _n_=1 then do; put '<?xml version="1.0" ?>'; put '<customer-data>'; output; end; put '<cust-info>';
ODS
ods xml file="c:\xmltabulate.xml"; proc tabulate data=SASUSER.CLASS ; table ALL ,(sex age height weight) * n =' ' ; class sex age height weight; run; ods xml close;
November, 2001
Libname Statement
libname sampdata 'C:\mylib' ; libname DestXML XML 'output.xml'; data DestXML.dsetanything ; set sampdata.customer (label="My customer information"); addr1=urlencode(addr1); label custnum ="Customer-Information"; run;
Reading XML
Handled through an XML Parser
Checks for Validity and Well Formedness IBMs Java Parser Microsofts ActiveX Parser SAS Libname Engine SAS Map Tool
Rendering XML
Web Browsers Transformation Tools Style Sheets
Cascading Style Sheets - CSS eXtensible Style Language - XSL
November, 2001
Resources
Glossary Articles General XML Resources SAS Base R&D Web Site
www.sas.com/rnd/base
November, 2001
Contact Information
ThotWave Technologies
Thinking Data