This example imports the XML document PRECISION.XML,
which was exported in
Exporting Numeric Values. This example illustrates how you
can change the behavior for importing numeric values.
The first SAS program
imports the XML document using the default behavior, which retrieves
parsed character data (PCDATA) from the element:
libname default xml 'C:\My Documents\precision.xml';
title 'Default Method';
proc print data=default.rawtest;
format n_pi f14.10;
run;
The result of the import
is the SAS data set DEFAULT.RAWTEST.
PRINT Procedure Output for DEFAULT.RAWTEST
The second SAS program imports
the XML document using the XMLDOUBLE= option in order to change the
behavior, which retrieves the value from the rawdata= attribute in
the element:
libname new xml 'C:\My Documents\precision.xml' xmldouble=internal;
title 'Precision Method';
proc print data=new.rawtest;
format n_pi f14.10;
run;
The result of the import
is SAS data set NEW.RAWTEST.
PRINT Procedure Output for NEW.RAWTEST