DATA Step, Macro, Functions and more

Using PROC Template Tagset for XML Export

Reply
Occasional Contributor
Posts: 15

Using PROC Template Tagset for XML Export

Hi Guys,

 

I am looking into use of PROC Template with Define Tagset  option for exporting SAS datasets into XML files. The online materials are quite explanatory in terms the commands to be used and syntax to be followed for the same. 

However, I am unable to get below things.

1. How would the programmer decide the sequence of events to be created?

2. Is events name just like variable name where user can use any name as per convenience? If not, is there any online resource where I can find the event names and their use?

3. How events gets executed and mapped to the dataset to print values in XML?

 

I look forward to your responses.

 

Thanks,

Mahesh

Super User
Super User
Posts: 9,402

Re: Using PROC Template Tagset for XML Export

Posted in reply to mahesh146
Occasional Contributor
Posts: 15

Re: Using PROC Template Tagset for XML Export

Thanks for the link. I had already explored that one. Smiley Happy

 

The problem is that we need XML file in specific format with more than 4 level of hierarchies which can be achieved through custom tagset. So looking for the answers on PROC Template.

Super User
Super User
Posts: 9,402

Re: Using PROC Template Tagset for XML Export

Posted in reply to mahesh146

Perhaps an xmlmap could work then?

http://support.sas.com/resources/papers/proceedings17/1318-2017.pdf

 

I don't actually know of any resource to show how to create tagsets for proc template, I did look myself sometime back and couldn't find anything.  You can glean things from looking at what has been written already, i.e. tagsets.excelxp and rtf and such like.  That gives a good view on it.  really could use a good paper on the subject though I agree.

Super User
Posts: 13,295

Re: Using PROC Template Tagset for XML Export

Posted in reply to mahesh146

@mahesh146 wrote:

Thanks for the link. I had already explored that one. Smiley Happy

 

The problem is that we need XML file in specific format with more than 4 level of hierarchies which can be achieved through custom tagset. So looking for the answers on PROC Template.


Admittedly the tagsets.excelp has bunch of Microsoft centric verbiage but find the excelxp.tpl file (basically the template code) and that may give some starting point.

 

It sure seems that every "wonderful" XML use seems to come with a "and here's where to buy the tool to make/use the wonderful format" pitch. 

Ask a Question
Discussion stats
  • 4 replies
  • 82 views
  • 0 likes
  • 3 in conversation