| Return to ODS
|
The ODS XML driver is preproduction in SAS 8 and 8TS1. It has been replaced by ODS MARKUP in SAS®9.
Because ODS XML is a preproduction driver in SAS 8 and 8 TS1, there is no guarantee that the output will always be valid XML.
The SAS 8 ODS XML driver has only one output type which is a proprietary format. The DTD is fairly free-form, but the metadata included gives much more information about the properties of the data than any other ODS driver. The output document is also very hierarchical to provide information about the relationships of various sections.
The SAS 8 TS1 ODS XML driver expands on the SAS 8 driver by adding more metadata and alternate DTDs. The additional metadata provides greater knowledge about the information contained in the XML that can be used in transformations or filtering. In addition, several other XML or XML-like outputs can be generated. These include:
The ODS XML statement continues to be preproduction in SAS 8.2 (but is pretty robust). ODS XML is still supported in SAS®9 although its functionality has been rolled into ODS MARKUP, with more flexibility - you can customize the output to produce many different flavors of MARKUP language.
Return to the table of contents.The syntax of the ODS XML statement is rather terse at the moment, but many more options are on the way. If you have any requests, please let us know.
Return to the table of contents.As previously mentioned, the SAS designed DTDs are rather free-form. Many of the elements such as tables, titles, notes, warnings, etc. can occur zero or more times in almost any order. However, these objects are grouped by procedure call and directory entries.
The DTDs used in the ODS XML driver can be found by following the links below.
Return to the table of contents.Now that you have seen what the tag set and structure of the XML output should look like, you can generate some output using your own data. The following links point to some examples demonstrating how to use the ODS system to generate XML output. All examples are taken from the sample source programs delivered with the SAS System.
Example 1 is a SAS Version 8 example and Example 2 is the same example for Version 8 TS1 XML.
Return to the table of contents.So now you have XML output from SAS. What are you going to do with it? Here is where the metadata contained within the XML becomes useful. This metadata can be used to transform the SAS XML into XML (or non-XML) used by other applications. It can also be used to extract fragments of the entire output based on some given criteria. A short tutorial has been created to show you how to use some freely available XML tools to filter and transform the raw SAS XML output.
Return to the table of contents.This section contains pieces of sample code that are used in the course of this document.
Return to the table of contents.