BookmarkSubscribeRSS Feed
airton
Calcite | Level 5

Hi

I need to export multiples tables SAS to a single xml archive.

 

I'm looking for something like this:

 

<SXLEMAP name="AUTO_GEN" version="2.1">

<OUTPUT>
<TABLEREF name="table1"/>

<TABLEREF name="table2"/>
</OUTPUT>

<TABLE description="table1" name="table1">

....

</TABLE>

 

<TABLE description="table2" name="table1">

....

</TABLE>

 

But, it doens't work.

 

Someone can help me?

4 REPLIES 4
BrunoMueller
SAS Super FREQ

According to the doc

Elements for Exporting

Export an XML document from a SAS data set by using the XMLMap that was created to import the XML document.

Restriction: The engine supports exporting from one SAS data set only.

 

So using a XMLMap only one table can be written as an XML

 

However you can use the DATA Step with its BY group processing capabilites to write out the desired XML structure.

 

Bruno

airton
Calcite | Level 5

Thank you for your time.

 

Was useful know that xmlmap has no suport for export multiple sas datasets.

 

I wrote a set of %macros to build my xml file.

 

Thank you Bruno_SAS again.

PhilC
Rhodochrosite | Level 12

This seems so short sided.  A XML document in general should be expected to have more complexity than a flat file.

PhilC
Rhodochrosite | Level 12
oh, PROC XSL, I'm learning about this. This maybe part of this ideal of make a more complex XML file.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 1220 views
  • 1 like
  • 3 in conversation