SAS Institute. The Power to Know

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

space
Previous Page | Next Page

Importing XML Documents Using an XMLMap

Referencing a Fileref Using the URL Access Method

Using several methods, the XML engine can access an XML document that is referenced by a fileref. When using the URL access method to reference a fileref, you should also specify an XMLMap. Specifying an XMLMap causes the XML engine to process the XML document with a single pass of the file, rather than a double pass, which is what happens when you do not specify an XMLMap.

This example illustrates how to access an XML document by referencing a fileref and using the URL access method:

filename NHL url 'http://sww.sas.com/NHL.xml';
filename MAP 'C:\My Documents\XML\NHL.map';

libname NHL xml xmlmap=MAP;

proc copy indd=nhl outdd=work; select NHL;
run;

proc print data=NHL.TEAMS;
run;

space
Previous Page | Next Page | Top of Page