Hi,
I'm using the following code to import XML. I get ERROR: The creation of the XML Mapper file failed. I am on sas 9.4. Any ideas on how to work around? I googled this error and saw encoding mentioned; putting an encoding option on my filename statement does not seem to work. Any tips appreciated.
filename myxml '/mypath/import.xml';
filename mymap '/mypath/generate.map';
libname myxml xmlv2 automap=replace xmlmap=mymap;
Correction: I am using SAS Enterprise Guide, 7.15
Try this code
filename MYXML '/tmp/import.xml';
filename MYMAP '/tmp/generate.map';
ods xml file=MYXML;
proc print data=SASHELP.CLASS; run;
ods xml close;
libname MYXML xmlv2 automap=replace xmlmap=MYMAP;
to see if you get this log:
4 filename MYXML '/tmp/import.xml'; 5 filename MYMAP '/tmp/generate.map'; 6 7 ods xml file=MYXML; NOTE: Writing XML Body file: MYXML 8 proc print data=SASHELP.CLASS; run; NOTE: There were 19 observations read from the data set SASHELP.CLASS. NOTE: The PROCEDURE PRINT printed page 1. NOTE: PROCEDURE PRINT used (Total process time): real time 0.04 seconds cpu time 0.04 seconds 9 ods xml close; 10 11 libname MYXML xmlv2 automap=replace xmlmap=MYMAP; NOTE: Processing XMLMap version 2.1. NOTE: Libref MYXML was successfully assigned as follows: Engine: XMLV2 Physical Name: /tmp/import.xml
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.