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_CODE | BAL_SHEET_FOOT | CAPITALFUNDS | MIN_CAP_PRESC_REG | MIN_CAP_ADEQU_PRESC_REG | CAP_ADEQU_RATIO | NOTIONAL_CAP_FUNDS | RISK_WEIGHTED_ASSETS | NOTIONAL_CAP_ADEQU_RATIO | CAP_RESERV_BAL_SHEET |
639106 | 122345 | 122345 | 122345 | 122345 | 122345 | 122345 | 122345 | 122345 | 122345 |
639110 | 122345 | 122345 | 122345 | 122345 | 122345 | 122345 | 122345 | 122345 | 122345 |
639127 | 122345 | 122345 | 122345 | 122345 | 122345 | 122345 | 122345 | 122345 | 122345 |
639129 | 122345 | 122345 | 122345 | 122345 | 122345 | 122345 | 122345 | 122345 | 122345 |
639130 | 122345 | 122345 | 122345 | 122345 | 122345 | 122345 | 122345 | 122345 | 122345 |
Regards,
Ramesh
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
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,
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.
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.