SAS Institute. The Power to Know

SAS(R) 9.2 XML LIBNAME Engine: User's Guide

space
Previous Page | Next Page

Exporting XML Documents

Exporting an XML Document in CDISC ODM Markup

This example exports the SAS data set that was imported in Importing a CDISC ODM Document back to an XML document that is in CDISC ODM markup. Because the CDISCODM markup type is specified, the XML engine generates tags that are specific to the CDISC Operational Data Model.

The following SAS program exports an XML document from the SAS data set ODM.AE:

filename output 'C:\myoutput.xml';1 
libname  output xml xmltype=CDISCODM formatactive=yes;2  

data output.AE2; 
   set odm.AE;
run;

  1. The FILENAME statement assigns the fileref OUTPUT to the physical location of the external file to which the exported information will be written (complete pathname, filename, and file extension).

  2. The LIBNAME statement specifies the fileref OUTPUT as the output location and specifies the XML engine. It includes the following engine options:

    • XMLTYPE=CDISCODM supports the markup standards for CDISC ODM 1.2.

    • FORMATACTIVE=YES specifies to convert SAS formats to the corresponding CDISC ODM CodeList elements.

The output is the same as the XML document that is shown in Example CDISC ODM Document.

space
Previous Page | Next Page | Top of Page