Sample 48825: How to use an XML Map file for exporting XML output
You can use an XML Map for exporting XML output when using the XMLV2 LIBNAME engine, or when using the alias XML92 LIBNAME engine. To export an XML document that was imported using an XML Map, you can add exporting elements, and then use the XML Map to map the SAS data set back into a specific XML document structure rather than a rectangular structure that is generated by default. In the LIBNAME statement, specify the XMLV2 engine, include the XMLTYPE=XMLMAP option,
and include the XMLMAP= option to specify the XML Map. See the sample code on the Full Code tab for an example of the syntax.
Note that when using the XML Map file for exporting, you are limited to exporting a single document.
Other methods that you can use to export XML files to a specific document structure include using the ODS Markup Language to generate and apply a custom tagset, or using the DATA step.
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
/* The XML file NHLOUT.XML is created using */
/* the XML Map file NHLexport.MAP. */
libname nhl 'c:\myfiles';
libname out xmlv2 'c:\XML\NHLOUT.XML'
xmltype=xmlmap
xmlmap='c:\XML\NHLexport.MAP';
data out.teams;
set nhl.teams;
run;
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
Date Modified: | 2013-01-02 12:58:12 |
Date Created: | 2012-12-31 09:53:43 |
Operating System and Release Information
SAS System | Base SAS | Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.2 TS2M3 | |
z/OS | 9.2 TS2M3 | |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.2 TS2M3 | |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.2 TS2M3 | |
Microsoft Windows XP 64-bit Edition | 9.2 TS2M3 | |
Microsoft® Windows® for x64 | 9.2 TS2M3 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.2 TS2M3 | |
Microsoft Windows Server 2003 Enterprise Edition | 9.2 TS2M3 | |
Microsoft Windows Server 2003 Standard Edition | 9.2 TS2M3 | |
Microsoft Windows Server 2003 for x64 | 9.2 TS2M3 | |
Microsoft Windows Server 2008 | 9.2 TS2M3 | |
Microsoft Windows Server 2008 for x64 | 9.2 TS2M3 | |
Microsoft Windows XP Professional | 9.2 TS2M3 | |
Windows 7 Enterprise 32 bit | 9.2 TS2M3 | |
Windows 7 Enterprise x64 | 9.2 TS2M3 | |
Windows 7 Home Premium 32 bit | 9.2 TS2M3 | |
Windows 7 Home Premium x64 | 9.2 TS2M3 | |
Windows 7 Professional 32 bit | 9.2 TS2M3 | |
Windows 7 Professional x64 | 9.2 TS2M3 | |
Windows 7 Ultimate 32 bit | 9.2 TS2M3 | |
Windows 7 Ultimate x64 | 9.2 TS2M3 | |
Windows Vista | 9.2 TS2M3 | |
Windows Vista for x64 | 9.2 TS2M3 | |
64-bit Enabled AIX | 9.2 TS2M3 | |
64-bit Enabled HP-UX | 9.2 TS2M3 | |
64-bit Enabled Solaris | 9.2 TS2M3 | |
HP-UX IPF | 9.2 TS2M3 | |
Linux | 9.2 TS2M3 | |
Linux for x64 | 9.2 TS2M3 | |
OpenVMS on HP Integrity | 9.2 TS2M3 | |
Solaris for x64 | 9.2 TS2M3 | |