Overview of Common Data Sources |
The XML LIBNAME engine works in a way similar to other SAS engines. A LIBNAME statement is executed so that a libref is assigned and an engine is specified. That libref is then used throughout the SAS session.
Instead of the libref being associated with the physical location of a SAS library, the libref for the XML engine is associated with a physical location of an XML document. When you use the libref that is associated with an XML document, SAS either translates the data in a SAS data set into XML markup or translates the XML markup into SAS format.
The XML LIBNAME engine can read input streams from a Web service input and write an output stream to a Web service output. The XML LIBNAME engine supports reading XML files in complex structures using XMLMaps. An XMLMap is a user-defined file that contains XML tags that tell the XML LIBNAME engine how to interpret an XML document. XMLMaps are defined using the SAS XML Mapper product. For additional information, see the SAS XML LIBNAME Engine User's Guide.
XML files are written by the XML Writer transformation provided by SAS Data Integration Studio. The XML LIBNAME engine supports Output Delivery System (ODS) tag sets; XMLMaps are not supported for writing. The XML Writer transformation in SAS Data Integration Studio ships with a sample ODS tag set, if needed. An output XML document can either be:
used by a product that processes XML documents
moved to another host for the XML LIBNAME engine to process by translating the XML markup back to a SAS data set
Because the XML LIBNAME engine is designed to handle tabular data, all the data sent to or from a Web service must be in table form.
The following figure shows connectivity to XML files:
Establishing Connectivity to XML Files
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.