Desktop productivity for business analysts and programmers

XMl Out put form DATA SET

Reply
Contributor
Posts: 31

XMl Out put form DATA SET

Hi ,

I am trying to generate XMl out put from SAS Data set which is having more than two are more rows .also i want to add user defined tags in XML file  i am attaching desired xml out put file and sample data set below

REPORT_CODEBAL_SHEET_FOOTCAPITALFUNDSMIN_CAP_PRESC_REGMIN_CAP_ADEQU_PRESC_REGCAP_ADEQU_RATIONOTIONAL_CAP_FUNDSRISK_WEIGHTED_ASSETSNOTIONAL_CAP_ADEQU_RATIOCAP_RESERV_BAL_SHEET
639106122345122345122345122345122345122345122345122345122345
639110122345122345122345122345122345122345122345122345122345
639127122345122345122345122345122345122345122345122345122345
639129122345122345122345122345122345122345122345122345122345
639130122345122345122345122345122345122345122345122345122345

Regards,

Ramesh

Super Contributor
Posts: 578

Re: XMl Out put form DATA SET

from support.sas.com...

The following SAS statements export the SAS data set named NHL.TEAMS to an XML document named NHLOUT.XML, using an XMLMap named NHLEXPORT.MAP:

libname nhl 'C:\My Documents\myfiles';  filename out 'C:\My Documents\XML\NHLOUT.xml';  libname out xml92 xmltype=xmlmap  xmlmap='C:\My Documents\XML\NHLexport.map';  data out.TEAMS; set nhl.teams; run;

Here's the article on creating the xml map:

SAS(R) 9.2 XML LIBNAME Engine: User's Guide, Second EditionSAS(R) 9.2 XML LIBNAME Engine: User's Guide, Second Edition

Occasional Contributor
Posts: 17

Re: XMl Out put form DATA SET

Hi,

I do not think this is a helpful answers, I am still dealing a problem which XML mapper doesn't allow to generate 2 or more different table, the best option is to use XML map to create the root, child(so on) tagging. exporting xml are totally different from importing you require edit the map file generated from XML mapper here are some links you may do some research,

SAS(R) 9.2 XML LIBNAME Engine: User's Guide, Second Edition

Using an XMLMap to Export an XML Document with a Hierarchical Structure

SAS(R) 9.2 XML LIBNAME Engine: User's Guide, Second Edition

frist step is to use xml mapper to generate the require tag and tree you wanted,

secound you need to add require code for exporting the data( the secound link will teach you how ).

I already ask Sas supporting still not getting any good result from them, they told me to use ODS markup statement.

Regards,

Ask a Question
Discussion stats
  • 2 replies
  • 206 views
  • 0 likes
  • 3 in conversation