• Print  |
  • Feedback  |

FOCUS AREAS

XML LIBNAME engine

Base SAS

Using the SAS 9.1 XML LIBNAME Engine

This document highlights Release 9.1 enhancements for the SAS XML LIBNAME engine.


Contents


Understanding the XML LIBNAME Engine in SAS®9

SAS 9.1 represents the latest release of SAS software. For the XML LIBNAME engine, which is provided with Base SAS, SAS 9.1 imports and exports a broader variety of XML documents.

This document summarizes new and enhanced functionality in SAS 9.1. For a summary of the SAS 9.0 changes, see Using the SAS 9.0 XML LIBNAME Engine.


What's New for the LIBNAME Statement?

Here are examples and explanations of new options for the LIBNAME statement for the XML engine. Note that these enhancements are documented in the SAS XML LIBNAME Engine User's Guide.

XMLMap Syntax Version 1.2

The value of the DATATYPE element, which specifies the type of data being read from the XML document for the variable, is changed to conform directly to the XML schema datatypes specification. For example, earlier versions accepted <DATATYPE>DT-8601</DATATYPE> and now version 1.2 accepts <DATATYPE>dateTime</DATATYPE>.

For version 1.2, the type of data specification can be

string
specifies that the data contains alphanumeric characters and does not contain numbers used for calculations.

integer
specifies that the data contains whole numbers used for calculations.

double
specifies that the data contains floating-point numbers.

dateTime
specifies that the input represents a valid datetime value.

date
specifies that the input represents a valid date value.

time
specifies that the input represents a valid time value.

Note: The values for XMLMap syntax version 1.0 and 1.1 are not accepted by version 1.2.


Using ISO 8601 SAS Formats and Informats

Several ISO 8601 SAS formats and informats are available to support the international standard for the representation of dates and times. The standard defines a large number of alternative representations of dates, times, and time intervals. The representations can be either in a basic format that has a minimal number of characters or in an extended format that adds characters to enhance human readability. For example, January 3, 2003 can be represented as either 20030103 (basic format) or 2003-01-03 (extended format).

The SAS XML LIBNAME engine supports ISO 8601 date and time representations with several SAS formats and SAS informats. Here are examples that illustrate using the new formats and informats:


Where's the SAS 9.1 Documentation?

The XML engine's usage and reference documentation is available in one stand-alone document: SAS XML LIBNAME Engine User's Guide.

To locate the latest version of the documentation:


Your Turn

The developers, testers, and documenters that bring you the SAS XML LIBNAME engine are very interested in your feedback. You can send electronic mail to XMLEngine@sas.com with your comments.

Last Updated: 24 May 2004