Hi:
Yes, the SAS XML Libname engine worked in SAS 8.2 to convert a SAS dataset to an XML file. ODS MARKUP also worked in SAS 8.2 to convert procedure output (such as PROC PRINT) to an XML version of the report.
Probably in your instance, you want the SAS XML Libname engine. It produces very generic, very "flat" XML.
If your XML needs to conform to some standard or specification (such as CDISC), then you might consider checking out PROC CDISC before you go too far down the XML Libname Engine road.
http://support.sas.com/rnd/base/xmlengine/index.html
http://support.sas.com/rnd/base/xmlengine/proccdisc/index.html
There is an example below of using the SAS XML Libname engine to create an xml file from a SAS dataset.
cynthia
[pre]
libname xmlout xml "c:\temp\females_15_over.xml"
xmltype=generic;
data xmlout.class;
set sashelp.class;
where age ge 15 and sex = 'F';
run;
libname xmlout clear;
[/pre]
The XMLTYPE=GENERIC is the default and you don't need that option if you want the default. But XMLTYPE is one way to change the type of XML that's created. The example produces this XML file for the "generic" example:
[pre]
<?xml version="1.0" encoding="windows-1252" ?>
<TABLE>
<CLASS>
<Name> Janet </Name>
<Sex> F </Sex>
<Age> 15 </Age>
<Height> 62.5 </Height>
<Weight> 112.5 </Weight>
</CLASS>
<CLASS>
<Name> Mary </Name>
<Sex> F </Sex>
<Age> 15 </Age>
<Height> 66.5 </Height>
<Weight> 112 </Weight>
</CLASS>
</TABLE>
[/pre]
Then, if you change the XMLTYPE= to XMLTYPE=ORACLE, then this file is what you'd get for the XML output:
[pre]
<?xml version="1.0" encoding="windows-1252" ?>
<ROWSET>
<ROW>
<Name> Janet </Name>
<Sex> F </Sex>
<Age> 15 </Age>
<Height> 62.5 </Height>
<Weight> 112.5 </Weight>
</ROW>
<ROW>
<Name> Mary </Name>
<Sex> F </Sex>
<Age> 15 </Age>
<Height> 66.5 </Height>
<Weight> 112 </Weight>
</ROW>
</ROWSET>
[/pre]