BookmarkSubscribeRSS Feed
RameshReddy
Calcite | Level 5

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

2 REPLIES 2
DBailey
Lapis Lazuli | Level 10

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

Elenatec
Calcite | Level 5

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,

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!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 2 replies
  • 874 views
  • 0 likes
  • 3 in conversation